compiler.d.ts
2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import { CssAllNodesAST, CssCharsetAST, CssCommentAST, CssCommonPositionAST, CssCustomMediaAST, CssDeclarationAST, CssDocumentAST, CssFontFaceAST, CssHostAST, CssImportAST, CssKeyframeAST, CssKeyframesAST, CssMediaAST, CssNamespaceAST, CssPageAST, CssRuleAST, CssStylesheetAST, CssSupportsAST } from '../type';
declare class Compiler {
level: number;
indentation: string;
compress: boolean;
constructor(options?: {
indent?: string;
compress?: boolean;
});
emit(str: string, _position?: CssCommonPositionAST['position']): string;
/**
* Increase, decrease or return current indentation.
*/
indent(level?: number): string;
visit(node: CssAllNodesAST): string;
mapVisit(nodes: Array<CssAllNodesAST>, delim?: string): string;
compile(node: CssStylesheetAST): string;
/**
* Visit stylesheet node.
*/
stylesheet(node: CssStylesheetAST): string;
/**
* Visit comment node.
*/
comment(node: CssCommentAST): string;
/**
* Visit import node.
*/
import(node: CssImportAST): string;
/**
* Visit media node.
*/
media(node: CssMediaAST): string;
/**
* Visit document node.
*/
document(node: CssDocumentAST): string;
/**
* Visit charset node.
*/
charset(node: CssCharsetAST): string;
/**
* Visit namespace node.
*/
namespace(node: CssNamespaceAST): string;
/**
* Visit supports node.
*/
supports(node: CssSupportsAST): string;
/**
* Visit keyframes node.
*/
keyframes(node: CssKeyframesAST): string;
/**
* Visit keyframe node.
*/
keyframe(node: CssKeyframeAST): string;
/**
* Visit page node.
*/
page(node: CssPageAST): string;
/**
* Visit font-face node.
*/
fontFace(node: CssFontFaceAST): string;
/**
* Visit host node.
*/
host(node: CssHostAST): string;
/**
* Visit custom-media node.
*/
customMedia(node: CssCustomMediaAST): string;
/**
* Visit rule node.
*/
rule(node: CssRuleAST): string;
/**
* Visit declaration node.
*/
declaration(node: CssDeclarationAST): string;
}
export default Compiler;