UNPKG

2.19 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
4 * This code may only be used under the BSD style license found at
5 * http://polymer.github.io/LICENSE.txt
6 * The complete set of authors may be found at
7 * http://polymer.github.io/AUTHORS.txt
8 * The complete set of contributors may be found at
9 * http://polymer.github.io/CONTRIBUTORS.txt
10 * Code distributed by Google as part of the polymer project is also
11 * subject to an additional IP rights grant found at
12 * http://polymer.github.io/PATENTS.txt
13 */
14import { AstNodeWithLanguage } from '..';
15import * as jsdoc from '../javascript/jsdoc';
16import { ImmutableArray, ImmutableSet } from './immutable';
17import { SourceRange } from './source-range';
18import { Warning } from './warning';
19export declare abstract class Feature {
20 readonly kinds: Set<string> | ImmutableSet<string>;
21 readonly identifiers: Set<string> | ImmutableSet<string>;
22 /** Tracks the source that this feature came from. */
23 readonly sourceRange?: SourceRange;
24 /**
25 * The AST Node, if any, that corresponds to this feature in its containing
26 * document.
27 */
28 readonly astNode?: AstNodeWithLanguage;
29 /** Warnings that were encountered while processing this feature. */
30 readonly warnings: Array<Warning> | ImmutableArray<Warning>;
31 constructor(sourceRange?: SourceRange, astNode?: AstNodeWithLanguage, warnings?: Array<Warning> | ImmutableArray<Warning>);
32}
33export declare abstract class ScannedFeature {
34 readonly description?: string;
35 readonly jsdoc?: jsdoc.Annotation;
36 /** Tracks the source that this feature came from. */
37 readonly sourceRange: SourceRange | undefined;
38 /**
39 * The AST Node, if any, that corresponds to this feature in its containing
40 * document.
41 */
42 readonly astNode?: AstNodeWithLanguage;
43 /** Warnings that were encountered while processing this feature. */
44 readonly warnings: Array<Warning> | ImmutableArray<Warning>;
45 constructor(sourceRange?: SourceRange, astNode?: AstNodeWithLanguage, description?: string, jsdoc?: jsdoc.Annotation, warnings?: Warning[]);
46}
47export declare type Privacy = 'public' | 'private' | 'protected';