1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | import * as babel from '@babel/types';
|
15 | import { Annotation as JsDocAnnotation } from '../javascript/jsdoc';
|
16 | import { AstNodeWithLanguage, Class, Document, ElementMixin, Privacy, ScannedElementMixin, ScannedMethod, ScannedReference, SourceRange } from '../model/model';
|
17 | import { LocalId, Observer, PolymerExtension, PolymerProperty, ScannedPolymerExtension, ScannedPolymerProperty } from './polymer-element';
|
18 | export interface Options {
|
19 | name: string;
|
20 | jsdoc: JsDocAnnotation;
|
21 | description: string;
|
22 | summary: string;
|
23 | privacy: Privacy;
|
24 | sourceRange: SourceRange;
|
25 | mixins: ScannedReference<'element-mixin'>[];
|
26 | astNode: AstNodeWithLanguage;
|
27 | statementAst: babel.Statement | undefined;
|
28 | classAstNode?: babel.Node;
|
29 | }
|
30 | export declare class ScannedPolymerElementMixin extends ScannedElementMixin implements ScannedPolymerExtension {
|
31 | readonly properties: Map<string, ScannedPolymerProperty>;
|
32 | readonly methods: Map<string, ScannedMethod>;
|
33 | readonly staticMethods: Map<string, ScannedMethod>;
|
34 | readonly observers: Observer[];
|
35 | readonly listeners: {
|
36 | event: string;
|
37 | handler: string;
|
38 | }[];
|
39 | readonly behaviorAssignments: ScannedReference<'behavior'>[];
|
40 | pseudo: boolean;
|
41 | readonly abstract: boolean;
|
42 | readonly sourceRange: SourceRange;
|
43 | classAstNode?: babel.Node;
|
44 | constructor({ name, jsdoc, description, summary, privacy, sourceRange, mixins, astNode, statementAst, classAstNode }: Options);
|
45 | addProperty(prop: ScannedPolymerProperty): void;
|
46 | addMethod(method: ScannedMethod): void;
|
47 | resolve(document: Document): PolymerElementMixin;
|
48 | }
|
49 | declare module '../model/queryable' {
|
50 | interface FeatureKindMap {
|
51 | 'polymer-element-mixin': PolymerElementMixin;
|
52 | }
|
53 | }
|
54 | export declare class PolymerElementMixin extends ElementMixin implements PolymerExtension {
|
55 | readonly properties: Map<string, PolymerProperty>;
|
56 | readonly observers: Observer[];
|
57 | readonly listeners: {
|
58 | event: string;
|
59 | handler: string;
|
60 | }[];
|
61 | readonly behaviorAssignments: ScannedReference<'behavior'>[];
|
62 | readonly localIds: LocalId[];
|
63 | readonly pseudo: boolean;
|
64 | constructor(scannedMixin: ScannedPolymerElementMixin, document: Document);
|
65 | emitPropertyMetadata(property: PolymerProperty): {
|
66 | polymer: {
|
67 | notify: boolean | undefined;
|
68 | observer: string | undefined;
|
69 | readOnly: boolean | undefined;
|
70 | attributeType: string | undefined;
|
71 | };
|
72 | };
|
73 | protected _getSuperclassAndMixins(document: Document, init: ScannedPolymerElementMixin): Class[];
|
74 | }
|