1 | import type * as ASTv1 from '../v1/api';
|
2 | export declare const voidMap: Set<string>;
|
3 | export declare function getVoidTags(): string[];
|
4 | export interface PrinterOptions {
|
5 | entityEncoding: ASTv1.EntityEncodingState;
|
6 | |
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | override?(ast: ASTv1.Node, options: PrinterOptions): void | string;
|
21 | }
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | export declare function isVoidTag(tag: string): boolean;
|
31 | export default class Printer {
|
32 | private buffer;
|
33 | private options;
|
34 | constructor(options: PrinterOptions);
|
35 | handledByOverride(node: ASTv1.Node, ensureLeadingWhitespace?: boolean): boolean;
|
36 | Node(node: ASTv1.Node): void;
|
37 | Expression(expression: ASTv1.Expression): void;
|
38 | Literal(literal: ASTv1.Literal): void;
|
39 | TopLevelStatement(statement: ASTv1.TopLevelStatement | ASTv1.Template | ASTv1.AttrNode): void;
|
40 | Template(template: ASTv1.Template): void;
|
41 | Block(block: ASTv1.Block): void;
|
42 | TopLevelStatements(statements: ASTv1.TopLevelStatement[]): void;
|
43 | ElementNode(el: ASTv1.ElementNode): void;
|
44 | OpenElementNode(el: ASTv1.ElementNode): void;
|
45 | CloseElementNode(el: ASTv1.ElementNode): void;
|
46 | AttrNode(attr: ASTv1.AttrNode): void;
|
47 | AttrNodeValue(value: ASTv1.AttrNode['value']): void;
|
48 | TextNode(text: ASTv1.TextNode, isAttr?: boolean): void;
|
49 | MustacheStatement(mustache: ASTv1.MustacheStatement): void;
|
50 | BlockStatement(block: ASTv1.BlockStatement): void;
|
51 | BlockParams(blockParams: string[]): void;
|
52 | ConcatStatement(concat: ASTv1.ConcatStatement): void;
|
53 | MustacheCommentStatement(comment: ASTv1.MustacheCommentStatement): void;
|
54 | ElementModifierStatement(mod: ASTv1.ElementModifierStatement): void;
|
55 | CommentStatement(comment: ASTv1.CommentStatement): void;
|
56 | PathExpression(path: ASTv1.PathExpression): void;
|
57 | SubExpression(sexp: ASTv1.SubExpression): void;
|
58 | Params(params: ASTv1.Expression[]): void;
|
59 | Hash(hash: ASTv1.Hash): void;
|
60 | HashPair(pair: ASTv1.HashPair): void;
|
61 | StringLiteral(str: ASTv1.StringLiteral): void;
|
62 | BooleanLiteral(bool: ASTv1.BooleanLiteral): void;
|
63 | NumberLiteral(number: ASTv1.NumberLiteral): void;
|
64 | UndefinedLiteral(node: ASTv1.UndefinedLiteral): void;
|
65 | NullLiteral(node: ASTv1.NullLiteral): void;
|
66 | print(node: ASTv1.Node): string;
|
67 | }
|