|
1 |
| -// global flag to be compiled away |
2 |
| -declare var __WEEX__: boolean; |
3 |
| - |
4 | 1 | declare type CompilerOptions = {
|
5 | 2 | warn?: Function; // allow customizing warning in different environments; e.g. node
|
6 |
| - expectHTML?: boolean; // only false for non-web builds |
7 | 3 | modules?: Array<ModuleOptions>; // platform specific modules; e.g. style; class
|
8 |
| - staticKeys?: string; // a list of AST properties to be considered static; for optimization |
9 | 4 | directives?: { [key: string]: Function }; // platform specific directives
|
| 5 | + staticKeys?: string; // a list of AST properties to be considered static; for optimization |
10 | 6 | isUnaryTag?: (tag: string) => ?boolean; // check if a tag is unary for the platform
|
11 | 7 | canBeLeftOpenTag?: (tag: string) => ?boolean; // check if a tag can be left opened
|
12 | 8 | isReservedTag?: (tag: string) => ?boolean; // check if a tag is a native for the platform
|
| 9 | + preserveWhitespace?: boolean; // preserve whitespace between elements? |
| 10 | + optimize?: boolean; // optimize static content? |
| 11 | + |
| 12 | + // web specific |
13 | 13 | mustUseProp?: (tag: string, type: ?string, name: string) => boolean; // check if an attribute should be bound as a property
|
14 | 14 | isPreTag?: (attr: string) => ?boolean; // check if a tag needs to preserve whitespace
|
15 | 15 | getTagNamespace?: (tag: string) => ?string; // check the namespace for a tag
|
16 |
| - transforms?: Array<Function>; // a list of transforms on parsed AST before codegen |
17 |
| - preserveWhitespace?: boolean; |
| 16 | + expectHTML?: boolean; // only false for non-web builds |
18 | 17 | isFromDOM?: boolean;
|
19 | 18 | shouldDecodeTags?: boolean;
|
20 | 19 | shouldDecodeNewlines?: boolean;
|
21 | 20 | shouldDecodeNewlinesForHref?: boolean;
|
22 |
| - optimize?: boolean; |
23 |
| - |
24 |
| - // for ssr optimization compiler |
25 |
| - scopeId?: string; |
26 | 21 |
|
27 | 22 | // runtime user-configurable
|
28 | 23 | delimiters?: [string, string]; // template delimiters
|
| 24 | + comments?: boolean; // preserve comments in template |
29 | 25 |
|
30 |
| - // allow user kept comments |
31 |
| - comments?: boolean |
| 26 | + // for ssr optimization compiler |
| 27 | + scopeId?: string; |
32 | 28 | };
|
33 | 29 |
|
34 | 30 | declare type CompiledResult = {
|
|
0 commit comments