UNPKG

2.47 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 { ASTNode } from 'parse5';
15import { HtmlVisitor, ParsedHtmlDocument } from '../html/html-document';
16import { HtmlScanner } from '../html/html-scanner';
17import { Feature, HtmlAstNode, Resolvable, Slot, SourceRange, Warning } from '../model/model';
18import { HtmlDatabindingExpression, Template } from './expression-scanner';
19import { LocalId } from './polymer-element';
20export declare class ScannedDomModule implements Resolvable {
21 id: string | null;
22 node: ASTNode;
23 comment?: string;
24 sourceRange: SourceRange;
25 astNode: HtmlAstNode;
26 warnings: Warning[];
27 'slots': Slot[];
28 localIds: LocalId[];
29 template: Template | undefined;
30 databindings: HtmlDatabindingExpression[];
31 constructor(id: string | null, node: ASTNode, sourceRange: SourceRange, ast: HtmlAstNode, warnings: Warning[], template: Template | undefined, slots: Slot[], localIds: LocalId[], databindings: HtmlDatabindingExpression[]);
32 resolve(): DomModule;
33}
34declare module '../model/queryable' {
35 interface FeatureKindMap {
36 'dom-module': DomModule;
37 }
38}
39export declare class DomModule implements Feature {
40 kinds: Set<string>;
41 identifiers: Set<string>;
42 node: ASTNode;
43 id: string | null;
44 comment?: string;
45 sourceRange: SourceRange;
46 astNode: HtmlAstNode;
47 warnings: Warning[];
48 'slots': Slot[];
49 localIds: LocalId[];
50 template: Template | undefined;
51 databindings: HtmlDatabindingExpression[];
52 constructor(node: ASTNode, id: string | null, comment: string | undefined, sourceRange: SourceRange, ast: HtmlAstNode, warnings: Warning[], slots: Slot[], localIds: LocalId[], template: Template | undefined, databindings: HtmlDatabindingExpression[]);
53}
54export declare class DomModuleScanner implements HtmlScanner {
55 scan(document: ParsedHtmlDocument, visit: (visitor: HtmlVisitor) => Promise<void>): Promise<{
56 features: ScannedDomModule[];
57 }>;
58}