1
|
/**
|
2
|
* @license
|
3
|
* Copyright Google Inc. All Rights Reserved.
|
4
|
*
|
5
|
* Use of this source code is governed by an MIT-style license that can be
|
6
|
* found in the LICENSE file at https://angular.io/license
|
7
|
*/
|
8
|
export interface IVisitor {
|
9
|
visitTag(tag: Tag): any;
|
10
|
visitText(text: Text): any;
|
11
|
visitDeclaration(decl: Declaration): any;
|
12
|
visitDoctype(doctype: Doctype): any;
|
13
|
}
|
14
|
export declare function serialize(nodes: Node[]): string;
|
15
|
export interface Node {
|
16
|
visit(visitor: IVisitor): any;
|
17
|
}
|
18
|
export declare class Declaration implements Node {
|
19
|
attrs: {
|
20
|
[k: string]: string;
|
21
|
};
|
22
|
constructor(unescapedAttrs: {
|
23
|
[k: string]: string;
|
24
|
});
|
25
|
visit(visitor: IVisitor): any;
|
26
|
}
|
27
|
export declare class Doctype implements Node {
|
28
|
rootTag: string;
|
29
|
dtd: string;
|
30
|
constructor(rootTag: string, dtd: string);
|
31
|
visit(visitor: IVisitor): any;
|
32
|
}
|
33
|
export declare class Tag implements Node {
|
34
|
name: string;
|
35
|
children: Node[];
|
36
|
attrs: {
|
37
|
[k: string]: string;
|
38
|
};
|
39
|
constructor(name: string, unescapedAttrs?: {
|
40
|
[k: string]: string;
|
41
|
}, children?: Node[]);
|
42
|
visit(visitor: IVisitor): any;
|
43
|
}
|
44
|
export declare class Text implements Node {
|
45
|
value: string;
|
46
|
constructor(unescapedValue: string);
|
47
|
visit(visitor: IVisitor): any;
|
48
|
}
|
49
|
export declare class CR extends Text {
|
50
|
constructor(ws?: number);
|
51
|
}
|