1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | import * as babel from '@babel/types';
|
15 | import { ASTNode } from 'parse5';
|
16 | import * as jsdoc from '../javascript/jsdoc';
|
17 | import { ParsedDocument } from '../parser/document';
|
18 | import { Class, ClassInit } from './class';
|
19 | import { Privacy } from './feature';
|
20 | import { ImmutableArray } from './immutable';
|
21 | import { ScannedMethod } from './method';
|
22 | import { AstNodeWithLanguage, Attribute, Document, Event, Feature, Resolvable, ScannedAttribute, ScannedEvent, ScannedProperty, ScannedReference, SourceRange, Warning } from './model';
|
23 | import { FileRelativeUrl } from './url';
|
24 | export { Visitor } from '../javascript/estree-visitor';
|
25 |
|
26 |
|
27 |
|
28 | export declare abstract class ScannedElementBase implements Resolvable {
|
29 | properties: Map<string, ScannedProperty>;
|
30 | attributes: Map<string, ScannedAttribute>;
|
31 | description: string;
|
32 | summary: string;
|
33 | demos: Demo[];
|
34 | events: Map<string, ScannedEvent>;
|
35 | sourceRange: SourceRange | undefined;
|
36 | staticMethods: Map<string, ScannedMethod>;
|
37 | methods: Map<string, ScannedMethod>;
|
38 | astNode: AstNodeWithLanguage | undefined;
|
39 | statementAst: babel.Statement | undefined;
|
40 | warnings: Warning[];
|
41 | jsdoc?: jsdoc.Annotation;
|
42 | 'slots': Slot[];
|
43 | mixins: Array<ScannedReference<'element-mixin'>>;
|
44 | privacy: Privacy;
|
45 | abstract: boolean;
|
46 | superClass?: ScannedReference<'class'>;
|
47 | applyHtmlComment(commentText: string | undefined, containingDocument: ParsedDocument | undefined): void;
|
48 | abstract resolve(_document: Document): Feature;
|
49 | }
|
50 | export declare class Slot {
|
51 | name: string;
|
52 | range: SourceRange;
|
53 | astNode?: AstNodeWithLanguage;
|
54 | constructor(name: string, range: SourceRange, astNode: AstNodeWithLanguage | undefined);
|
55 | }
|
56 | export interface Demo {
|
57 | desc?: string;
|
58 | path: FileRelativeUrl;
|
59 | }
|
60 | export interface ElementBaseInit extends ClassInit {
|
61 | readonly events?: Map<string, Event>;
|
62 | readonly attributes?: Map<string, Attribute>;
|
63 | readonly slots?: Slot[];
|
64 | }
|
65 |
|
66 |
|
67 |
|
68 | export declare type ElementTemplate = {
|
69 | |
70 |
|
71 |
|
72 |
|
73 | kind: 'html';
|
74 | contents: ASTNode;
|
75 | } | {
|
76 | |
77 |
|
78 |
|
79 |
|
80 | kind: 'polymer-databinding';
|
81 | contents: ASTNode;
|
82 | };
|
83 |
|
84 |
|
85 |
|
86 | export declare abstract class ElementBase extends Class implements Feature {
|
87 | attributes: Map<string, Attribute>;
|
88 | events: Map<string, Event>;
|
89 | 'slots': ImmutableArray<Slot>;
|
90 | constructor(init: ElementBaseInit, document: Document);
|
91 | protected inheritFrom(superClass: Class): void;
|
92 | emitAttributeMetadata(_attribute: Attribute): Object;
|
93 | emitEventMetadata(_event: Event): Object;
|
94 | template: undefined | ElementTemplate;
|
95 | }
|