@angular/compiler 14.0.0-next.7 → 14.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/esm2020/src/compiler.mjs +4 -3
  2. package/esm2020/src/compiler_facade_interface.mjs +7 -1
  3. package/esm2020/src/core.mjs +6 -6
  4. package/esm2020/src/expression_parser/parser.mjs +12 -12
  5. package/esm2020/src/i18n/i18n_parser.mjs +3 -3
  6. package/esm2020/src/jit_compiler_facade.mjs +76 -44
  7. package/esm2020/src/ml_parser/html_whitespaces.mjs +2 -2
  8. package/esm2020/src/ml_parser/lexer.mjs +37 -37
  9. package/esm2020/src/ml_parser/parser.mjs +41 -41
  10. package/esm2020/src/parse_util.mjs +2 -2
  11. package/esm2020/src/render3/partial/api.mjs +1 -1
  12. package/esm2020/src/render3/partial/class_metadata.mjs +1 -1
  13. package/esm2020/src/render3/partial/component.mjs +28 -37
  14. package/esm2020/src/render3/partial/directive.mjs +6 -3
  15. package/esm2020/src/render3/partial/factory.mjs +1 -1
  16. package/esm2020/src/render3/partial/injectable.mjs +1 -1
  17. package/esm2020/src/render3/partial/injector.mjs +1 -1
  18. package/esm2020/src/render3/partial/ng_module.mjs +3 -3
  19. package/esm2020/src/render3/partial/pipe.mjs +6 -3
  20. package/esm2020/src/render3/r3_ast.mjs +3 -3
  21. package/esm2020/src/render3/r3_factory.mjs +6 -6
  22. package/esm2020/src/render3/r3_identifiers.mjs +4 -1
  23. package/esm2020/src/render3/r3_module_compiler.mjs +45 -8
  24. package/esm2020/src/render3/r3_pipe_compiler.mjs +5 -1
  25. package/esm2020/src/render3/util.mjs +4 -4
  26. package/esm2020/src/render3/view/api.mjs +7 -2
  27. package/esm2020/src/render3/view/compiler.mjs +45 -35
  28. package/esm2020/src/render3/view/i18n/get_msg_utils.mjs +58 -5
  29. package/esm2020/src/render3/view/i18n/meta.mjs +4 -4
  30. package/esm2020/src/render3/view/i18n/util.mjs +2 -2
  31. package/esm2020/src/render3/view/style_parser.mjs +20 -20
  32. package/esm2020/src/render3/view/styling_builder.mjs +8 -8
  33. package/esm2020/src/render3/view/template.mjs +45 -32
  34. package/esm2020/src/render3/view/util.mjs +14 -5
  35. package/esm2020/src/selector.mjs +10 -10
  36. package/esm2020/src/shadow_css.mjs +2 -2
  37. package/esm2020/src/template_parser/binding_parser.mjs +9 -9
  38. package/esm2020/src/util.mjs +8 -8
  39. package/esm2020/src/version.mjs +1 -1
  40. package/fesm2015/compiler.mjs +492 -325
  41. package/fesm2015/compiler.mjs.map +1 -1
  42. package/fesm2015/testing.mjs +1 -1
  43. package/fesm2020/compiler.mjs +500 -338
  44. package/fesm2020/compiler.mjs.map +1 -1
  45. package/fesm2020/testing.mjs +1 -1
  46. package/index.d.ts +4964 -5
  47. package/package.json +3 -3
  48. package/testing/index.d.ts +22 -5
  49. package/compiler.d.ts +0 -8
  50. package/public_api.d.ts +0 -13
  51. package/src/assertions.d.ts +0 -8
  52. package/src/chars.d.ts +0 -75
  53. package/src/compiler.d.ts +0 -77
  54. package/src/compiler_facade_interface.d.ts +0 -284
  55. package/src/compiler_util/expression_converter.d.ts +0 -71
  56. package/src/config.d.ts +0 -25
  57. package/src/constant_pool.d.ts +0 -37
  58. package/src/core.d.ts +0 -216
  59. package/src/expression_parser/ast.d.ts +0 -440
  60. package/src/expression_parser/lexer.d.ts +0 -47
  61. package/src/expression_parser/parser.d.ts +0 -315
  62. package/src/i18n/big_integer.d.ts +0 -108
  63. package/src/i18n/digest.d.ts +0 -44
  64. package/src/i18n/extractor_merger.d.ts +0 -27
  65. package/src/i18n/i18n_ast.d.ts +0 -148
  66. package/src/i18n/i18n_html_parser.d.ts +0 -19
  67. package/src/i18n/i18n_parser.d.ts +0 -18
  68. package/src/i18n/index.d.ts +0 -15
  69. package/src/i18n/message_bundle.d.ts +0 -28
  70. package/src/i18n/parse_util.d.ts +0 -14
  71. package/src/i18n/serializers/placeholder.d.ts +0 -25
  72. package/src/i18n/serializers/serializer.d.ts +0 -46
  73. package/src/i18n/serializers/xliff.d.ts +0 -19
  74. package/src/i18n/serializers/xliff2.d.ts +0 -19
  75. package/src/i18n/serializers/xmb.d.ts +0 -22
  76. package/src/i18n/serializers/xml_helper.d.ts +0 -52
  77. package/src/i18n/serializers/xtb.d.ts +0 -20
  78. package/src/i18n/translation_bundle.d.ts +0 -27
  79. package/src/injectable_compiler_2.d.ts +0 -24
  80. package/src/jit_compiler_facade.d.ts +0 -46
  81. package/src/ml_parser/ast.d.ts +0 -89
  82. package/src/ml_parser/entities.d.ts +0 -9
  83. package/src/ml_parser/html_parser.d.ts +0 -13
  84. package/src/ml_parser/html_tags.d.ts +0 -33
  85. package/src/ml_parser/html_whitespaces.d.ts +0 -45
  86. package/src/ml_parser/icu_ast_expander.d.ts +0 -42
  87. package/src/ml_parser/interpolation_config.d.ts +0 -14
  88. package/src/ml_parser/lexer.d.ts +0 -114
  89. package/src/ml_parser/parser.d.ts +0 -26
  90. package/src/ml_parser/tags.d.ts +0 -29
  91. package/src/ml_parser/tokens.d.ts +0 -141
  92. package/src/ml_parser/xml_parser.d.ts +0 -13
  93. package/src/ml_parser/xml_tags.d.ts +0 -24
  94. package/src/output/abstract_emitter.d.ts +0 -66
  95. package/src/output/abstract_js_emitter.d.ts +0 -19
  96. package/src/output/map_util.d.ts +0 -18
  97. package/src/output/output_ast.d.ts +0 -575
  98. package/src/output/output_jit.d.ts +0 -73
  99. package/src/output/output_jit_trusted_types.d.ts +0 -43
  100. package/src/output/source_map.d.ts +0 -29
  101. package/src/parse_util.d.ts +0 -75
  102. package/src/render3/partial/api.d.ts +0 -441
  103. package/src/render3/partial/class_metadata.d.ts +0 -10
  104. package/src/render3/partial/component.d.ts +0 -39
  105. package/src/render3/partial/directive.d.ts +0 -13
  106. package/src/render3/partial/factory.d.ts +0 -3
  107. package/src/render3/partial/injectable.d.ts +0 -19
  108. package/src/render3/partial/injector.d.ts +0 -3
  109. package/src/render3/partial/ng_module.d.ts +0 -3
  110. package/src/render3/partial/pipe.d.ts +0 -12
  111. package/src/render3/partial/util.d.ts +0 -33
  112. package/src/render3/r3_ast.d.ts +0 -211
  113. package/src/render3/r3_class_metadata_compiler.d.ts +0 -35
  114. package/src/render3/r3_factory.d.ts +0 -94
  115. package/src/render3/r3_identifiers.d.ts +0 -180
  116. package/src/render3/r3_injector_compiler.d.ts +0 -18
  117. package/src/render3/r3_jit.d.ts +0 -22
  118. package/src/render3/r3_module_compiler.d.ts +0 -77
  119. package/src/render3/r3_pipe_compiler.d.ts +0 -50
  120. package/src/render3/r3_template_transform.d.ts +0 -24
  121. package/src/render3/util.d.ts +0 -94
  122. package/src/render3/view/api.d.ts +0 -328
  123. package/src/render3/view/compiler.d.ts +0 -86
  124. package/src/render3/view/i18n/context.d.ts +0 -68
  125. package/src/render3/view/i18n/get_msg_utils.d.ts +0 -13
  126. package/src/render3/view/i18n/icu_serializer.d.ts +0 -9
  127. package/src/render3/view/i18n/localize_utils.d.ts +0 -24
  128. package/src/render3/view/i18n/meta.d.ts +0 -78
  129. package/src/render3/view/i18n/util.d.ts +0 -78
  130. package/src/render3/view/style_parser.d.ts +0 -18
  131. package/src/render3/view/styling_builder.d.ts +0 -211
  132. package/src/render3/view/t2_api.d.ts +0 -152
  133. package/src/render3/view/t2_binder.d.ts +0 -57
  134. package/src/render3/view/template.d.ts +0 -450
  135. package/src/render3/view/util.d.ts +0 -94
  136. package/src/resource_loader.d.ts +0 -17
  137. package/src/schema/dom_element_schema_registry.d.ts +0 -45
  138. package/src/schema/dom_security_schema.d.ts +0 -11
  139. package/src/schema/element_schema_registry.d.ts +0 -29
  140. package/src/schema/trusted_types_sinks.d.ts +0 -15
  141. package/src/selector.d.ts +0 -105
  142. package/src/shadow_css.d.ts +0 -76
  143. package/src/style_url_resolver.d.ts +0 -8
  144. package/src/template_parser/binding_parser.d.ts +0 -91
  145. package/src/template_parser/template_preparser.d.ts +0 -24
  146. package/src/util.d.ts +0 -42
  147. package/src/version.d.ts +0 -14
  148. package/testing/package.json +0 -9
  149. package/testing/public_api.d.ts +0 -13
  150. package/testing/src/testing.d.ts +0 -23
  151. package/testing/testing.d.ts +0 -4
@@ -1,114 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC 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
- import { ParseError, ParseSourceSpan } from '../parse_util';
9
- import { InterpolationConfig } from './interpolation_config';
10
- import { TagDefinition } from './tags';
11
- import { Token, TokenType } from './tokens';
12
- export declare class TokenError extends ParseError {
13
- tokenType: TokenType | null;
14
- constructor(errorMsg: string, tokenType: TokenType | null, span: ParseSourceSpan);
15
- }
16
- export declare class TokenizeResult {
17
- tokens: Token[];
18
- errors: TokenError[];
19
- nonNormalizedIcuExpressions: Token[];
20
- constructor(tokens: Token[], errors: TokenError[], nonNormalizedIcuExpressions: Token[]);
21
- }
22
- export interface LexerRange {
23
- startPos: number;
24
- startLine: number;
25
- startCol: number;
26
- endPos: number;
27
- }
28
- /**
29
- * Options that modify how the text is tokenized.
30
- */
31
- export interface TokenizeOptions {
32
- /** Whether to tokenize ICU messages (considered as text nodes when false). */
33
- tokenizeExpansionForms?: boolean;
34
- /** How to tokenize interpolation markers. */
35
- interpolationConfig?: InterpolationConfig;
36
- /**
37
- * The start and end point of the text to parse within the `source` string.
38
- * The entire `source` string is parsed if this is not provided.
39
- * */
40
- range?: LexerRange;
41
- /**
42
- * If this text is stored in a JavaScript string, then we have to deal with escape sequences.
43
- *
44
- * **Example 1:**
45
- *
46
- * ```
47
- * "abc\"def\nghi"
48
- * ```
49
- *
50
- * - The `\"` must be converted to `"`.
51
- * - The `\n` must be converted to a new line character in a token,
52
- * but it should not increment the current line for source mapping.
53
- *
54
- * **Example 2:**
55
- *
56
- * ```
57
- * "abc\
58
- * def"
59
- * ```
60
- *
61
- * The line continuation (`\` followed by a newline) should be removed from a token
62
- * but the new line should increment the current line for source mapping.
63
- */
64
- escapedString?: boolean;
65
- /**
66
- * If this text is stored in an external template (e.g. via `templateUrl`) then we need to decide
67
- * whether or not to normalize the line-endings (from `\r\n` to `\n`) when processing ICU
68
- * expressions.
69
- *
70
- * If `true` then we will normalize ICU expression line endings.
71
- * The default is `false`, but this will be switched in a future major release.
72
- */
73
- i18nNormalizeLineEndingsInICUs?: boolean;
74
- /**
75
- * An array of characters that should be considered as leading trivia.
76
- * Leading trivia are characters that are not important to the developer, and so should not be
77
- * included in source-map segments. A common example is whitespace.
78
- */
79
- leadingTriviaChars?: string[];
80
- /**
81
- * If true, do not convert CRLF to LF.
82
- */
83
- preserveLineEndings?: boolean;
84
- }
85
- export declare function tokenize(source: string, url: string, getTagDefinition: (tagName: string) => TagDefinition, options?: TokenizeOptions): TokenizeResult;
86
- /**
87
- * The _Tokenizer uses objects of this type to move through the input text,
88
- * extracting "parsed characters". These could be more than one actual character
89
- * if the text contains escape sequences.
90
- */
91
- interface CharacterCursor {
92
- /** Initialize the cursor. */
93
- init(): void;
94
- /** The parsed character at the current cursor position. */
95
- peek(): number;
96
- /** Advance the cursor by one parsed character. */
97
- advance(): void;
98
- /** Get a span from the marked start point to the current point. */
99
- getSpan(start?: this, leadingTriviaCodePoints?: number[]): ParseSourceSpan;
100
- /** Get the parsed characters from the marked start point to the current point. */
101
- getChars(start: this): string;
102
- /** The number of characters left before the end of the cursor. */
103
- charsLeft(): number;
104
- /** The number of characters between `this` cursor and `other` cursor. */
105
- diff(other: this): number;
106
- /** Make a copy of this cursor */
107
- clone(): CharacterCursor;
108
- }
109
- export declare class CursorError {
110
- msg: string;
111
- cursor: CharacterCursor;
112
- constructor(msg: string, cursor: CharacterCursor);
113
- }
114
- export {};
@@ -1,26 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC 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
- import { ParseError, ParseSourceSpan } from '../parse_util';
9
- import * as html from './ast';
10
- import { TokenizeOptions } from './lexer';
11
- import { TagDefinition } from './tags';
12
- export declare class TreeError extends ParseError {
13
- elementName: string | null;
14
- static create(elementName: string | null, span: ParseSourceSpan, msg: string): TreeError;
15
- constructor(elementName: string | null, span: ParseSourceSpan, msg: string);
16
- }
17
- export declare class ParseTreeResult {
18
- rootNodes: html.Node[];
19
- errors: ParseError[];
20
- constructor(rootNodes: html.Node[], errors: ParseError[]);
21
- }
22
- export declare class Parser {
23
- getTagDefinition: (tagName: string) => TagDefinition;
24
- constructor(getTagDefinition: (tagName: string) => TagDefinition);
25
- parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult;
26
- }
@@ -1,29 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC 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 declare enum TagContentType {
9
- RAW_TEXT = 0,
10
- ESCAPABLE_RAW_TEXT = 1,
11
- PARSABLE_DATA = 2
12
- }
13
- export interface TagDefinition {
14
- closedByParent: boolean;
15
- implicitNamespacePrefix: string | null;
16
- isVoid: boolean;
17
- ignoreFirstLf: boolean;
18
- canSelfClose: boolean;
19
- preventNamespaceInheritance: boolean;
20
- isClosedByChild(name: string): boolean;
21
- getContentType(prefix?: string): TagContentType;
22
- }
23
- export declare function splitNsName(elementName: string): [string | null, string];
24
- export declare function isNgContainer(tagName: string): boolean;
25
- export declare function isNgContent(tagName: string): boolean;
26
- export declare function isNgTemplate(tagName: string): boolean;
27
- export declare function getNsPrefix(fullName: string): string;
28
- export declare function getNsPrefix(fullName: null): null;
29
- export declare function mergeNsAndName(prefix: string, localName: string): string;
@@ -1,141 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC 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
- import { ParseSourceSpan } from '../parse_util';
9
- export declare const enum TokenType {
10
- TAG_OPEN_START = 0,
11
- TAG_OPEN_END = 1,
12
- TAG_OPEN_END_VOID = 2,
13
- TAG_CLOSE = 3,
14
- INCOMPLETE_TAG_OPEN = 4,
15
- TEXT = 5,
16
- ESCAPABLE_RAW_TEXT = 6,
17
- RAW_TEXT = 7,
18
- INTERPOLATION = 8,
19
- ENCODED_ENTITY = 9,
20
- COMMENT_START = 10,
21
- COMMENT_END = 11,
22
- CDATA_START = 12,
23
- CDATA_END = 13,
24
- ATTR_NAME = 14,
25
- ATTR_QUOTE = 15,
26
- ATTR_VALUE_TEXT = 16,
27
- ATTR_VALUE_INTERPOLATION = 17,
28
- DOC_TYPE = 18,
29
- EXPANSION_FORM_START = 19,
30
- EXPANSION_CASE_VALUE = 20,
31
- EXPANSION_CASE_EXP_START = 21,
32
- EXPANSION_CASE_EXP_END = 22,
33
- EXPANSION_FORM_END = 23,
34
- EOF = 24
35
- }
36
- export declare type Token = TagOpenStartToken | TagOpenEndToken | TagOpenEndVoidToken | TagCloseToken | IncompleteTagOpenToken | TextToken | InterpolationToken | EncodedEntityToken | CommentStartToken | CommentEndToken | CdataStartToken | CdataEndToken | AttributeNameToken | AttributeQuoteToken | AttributeValueTextToken | AttributeValueInterpolationToken | DocTypeToken | ExpansionFormStartToken | ExpansionCaseValueToken | ExpansionCaseExpressionStartToken | ExpansionCaseExpressionEndToken | ExpansionFormEndToken | EndOfFileToken;
37
- export declare type InterpolatedTextToken = TextToken | InterpolationToken | EncodedEntityToken;
38
- export declare type InterpolatedAttributeToken = AttributeValueTextToken | AttributeValueInterpolationToken | EncodedEntityToken;
39
- export interface TokenBase {
40
- type: TokenType;
41
- parts: string[];
42
- sourceSpan: ParseSourceSpan;
43
- }
44
- export interface TagOpenStartToken extends TokenBase {
45
- type: TokenType.TAG_OPEN_START;
46
- parts: [prefix: string, name: string];
47
- }
48
- export interface TagOpenEndToken extends TokenBase {
49
- type: TokenType.TAG_OPEN_END;
50
- parts: [];
51
- }
52
- export interface TagOpenEndVoidToken extends TokenBase {
53
- type: TokenType.TAG_OPEN_END_VOID;
54
- parts: [];
55
- }
56
- export interface TagCloseToken extends TokenBase {
57
- type: TokenType.TAG_CLOSE;
58
- parts: [prefix: string, name: string];
59
- }
60
- export interface IncompleteTagOpenToken extends TokenBase {
61
- type: TokenType.INCOMPLETE_TAG_OPEN;
62
- parts: [prefix: string, name: string];
63
- }
64
- export interface TextToken extends TokenBase {
65
- type: TokenType.TEXT | TokenType.ESCAPABLE_RAW_TEXT | TokenType.RAW_TEXT;
66
- parts: [text: string];
67
- }
68
- export interface InterpolationToken extends TokenBase {
69
- type: TokenType.INTERPOLATION;
70
- parts: [startMarker: string, expression: string, endMarker: string] | [
71
- startMarker: string,
72
- expression: string
73
- ];
74
- }
75
- export interface EncodedEntityToken extends TokenBase {
76
- type: TokenType.ENCODED_ENTITY;
77
- parts: [decoded: string, encoded: string];
78
- }
79
- export interface CommentStartToken extends TokenBase {
80
- type: TokenType.COMMENT_START;
81
- parts: [];
82
- }
83
- export interface CommentEndToken extends TokenBase {
84
- type: TokenType.COMMENT_END;
85
- parts: [];
86
- }
87
- export interface CdataStartToken extends TokenBase {
88
- type: TokenType.CDATA_START;
89
- parts: [];
90
- }
91
- export interface CdataEndToken extends TokenBase {
92
- type: TokenType.CDATA_END;
93
- parts: [];
94
- }
95
- export interface AttributeNameToken extends TokenBase {
96
- type: TokenType.ATTR_NAME;
97
- parts: [prefix: string, name: string];
98
- }
99
- export interface AttributeQuoteToken extends TokenBase {
100
- type: TokenType.ATTR_QUOTE;
101
- parts: [quote: '\'' | '"'];
102
- }
103
- export interface AttributeValueTextToken extends TokenBase {
104
- type: TokenType.ATTR_VALUE_TEXT;
105
- parts: [value: string];
106
- }
107
- export interface AttributeValueInterpolationToken extends TokenBase {
108
- type: TokenType.ATTR_VALUE_INTERPOLATION;
109
- parts: [startMarker: string, expression: string, endMarker: string] | [
110
- startMarker: string,
111
- expression: string
112
- ];
113
- }
114
- export interface DocTypeToken extends TokenBase {
115
- type: TokenType.DOC_TYPE;
116
- parts: [content: string];
117
- }
118
- export interface ExpansionFormStartToken extends TokenBase {
119
- type: TokenType.EXPANSION_FORM_START;
120
- parts: [];
121
- }
122
- export interface ExpansionCaseValueToken extends TokenBase {
123
- type: TokenType.EXPANSION_CASE_VALUE;
124
- parts: [value: string];
125
- }
126
- export interface ExpansionCaseExpressionStartToken extends TokenBase {
127
- type: TokenType.EXPANSION_CASE_EXP_START;
128
- parts: [];
129
- }
130
- export interface ExpansionCaseExpressionEndToken extends TokenBase {
131
- type: TokenType.EXPANSION_CASE_EXP_END;
132
- parts: [];
133
- }
134
- export interface ExpansionFormEndToken extends TokenBase {
135
- type: TokenType.EXPANSION_FORM_END;
136
- parts: [];
137
- }
138
- export interface EndOfFileToken extends TokenBase {
139
- type: TokenType.EOF;
140
- parts: [];
141
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC 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
- import { TokenizeOptions } from './lexer';
9
- import { Parser, ParseTreeResult } from './parser';
10
- export declare class XmlParser extends Parser {
11
- constructor();
12
- parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult;
13
- }
@@ -1,24 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC 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
- import { TagContentType, TagDefinition } from './tags';
9
- export declare class XmlTagDefinition implements TagDefinition {
10
- closedByParent: boolean;
11
- requiredParents: {
12
- [key: string]: boolean;
13
- };
14
- parentToAdd: string;
15
- implicitNamespacePrefix: string;
16
- isVoid: boolean;
17
- ignoreFirstLf: boolean;
18
- canSelfClose: boolean;
19
- preventNamespaceInheritance: boolean;
20
- requireExtraParent(currentParent: string): boolean;
21
- isClosedByChild(name: string): boolean;
22
- getContentType(): TagContentType;
23
- }
24
- export declare function getXmlTagDefinition(tagName: string): XmlTagDefinition;
@@ -1,66 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC 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
- import { ParseSourceSpan } from '../parse_util';
9
- import * as o from './output_ast';
10
- import { SourceMapGenerator } from './source_map';
11
- export declare class EmitterVisitorContext {
12
- private _indent;
13
- static createRoot(): EmitterVisitorContext;
14
- private _lines;
15
- constructor(_indent: number);
16
- println(from?: {
17
- sourceSpan: ParseSourceSpan | null;
18
- } | null, lastPart?: string): void;
19
- lineIsEmpty(): boolean;
20
- lineLength(): number;
21
- print(from: {
22
- sourceSpan: ParseSourceSpan | null;
23
- } | null, part: string, newLine?: boolean): void;
24
- removeEmptyLastLine(): void;
25
- incIndent(): void;
26
- decIndent(): void;
27
- toSource(): string;
28
- toSourceMapGenerator(genFilePath: string, startsAtLine?: number): SourceMapGenerator;
29
- spanOf(line: number, column: number): ParseSourceSpan | null;
30
- }
31
- export declare abstract class AbstractEmitterVisitor implements o.StatementVisitor, o.ExpressionVisitor {
32
- private _escapeDollarInStrings;
33
- constructor(_escapeDollarInStrings: boolean);
34
- protected printLeadingComments(stmt: o.Statement, ctx: EmitterVisitorContext): void;
35
- visitExpressionStmt(stmt: o.ExpressionStatement, ctx: EmitterVisitorContext): any;
36
- visitReturnStmt(stmt: o.ReturnStatement, ctx: EmitterVisitorContext): any;
37
- visitIfStmt(stmt: o.IfStmt, ctx: EmitterVisitorContext): any;
38
- abstract visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any;
39
- visitWriteVarExpr(expr: o.WriteVarExpr, ctx: EmitterVisitorContext): any;
40
- visitWriteKeyExpr(expr: o.WriteKeyExpr, ctx: EmitterVisitorContext): any;
41
- visitWritePropExpr(expr: o.WritePropExpr, ctx: EmitterVisitorContext): any;
42
- visitInvokeFunctionExpr(expr: o.InvokeFunctionExpr, ctx: EmitterVisitorContext): any;
43
- visitTaggedTemplateExpr(expr: o.TaggedTemplateExpr, ctx: EmitterVisitorContext): any;
44
- visitWrappedNodeExpr(ast: o.WrappedNodeExpr<any>, ctx: EmitterVisitorContext): any;
45
- visitTypeofExpr(expr: o.TypeofExpr, ctx: EmitterVisitorContext): any;
46
- visitReadVarExpr(ast: o.ReadVarExpr, ctx: EmitterVisitorContext): any;
47
- visitInstantiateExpr(ast: o.InstantiateExpr, ctx: EmitterVisitorContext): any;
48
- visitLiteralExpr(ast: o.LiteralExpr, ctx: EmitterVisitorContext): any;
49
- visitLocalizedString(ast: o.LocalizedString, ctx: EmitterVisitorContext): any;
50
- abstract visitExternalExpr(ast: o.ExternalExpr, ctx: EmitterVisitorContext): any;
51
- visitConditionalExpr(ast: o.ConditionalExpr, ctx: EmitterVisitorContext): any;
52
- visitNotExpr(ast: o.NotExpr, ctx: EmitterVisitorContext): any;
53
- abstract visitFunctionExpr(ast: o.FunctionExpr, ctx: EmitterVisitorContext): any;
54
- abstract visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, context: any): any;
55
- visitUnaryOperatorExpr(ast: o.UnaryOperatorExpr, ctx: EmitterVisitorContext): any;
56
- visitBinaryOperatorExpr(ast: o.BinaryOperatorExpr, ctx: EmitterVisitorContext): any;
57
- visitReadPropExpr(ast: o.ReadPropExpr, ctx: EmitterVisitorContext): any;
58
- visitReadKeyExpr(ast: o.ReadKeyExpr, ctx: EmitterVisitorContext): any;
59
- visitLiteralArrayExpr(ast: o.LiteralArrayExpr, ctx: EmitterVisitorContext): any;
60
- visitLiteralMapExpr(ast: o.LiteralMapExpr, ctx: EmitterVisitorContext): any;
61
- visitCommaExpr(ast: o.CommaExpr, ctx: EmitterVisitorContext): any;
62
- visitAllExpressions(expressions: o.Expression[], ctx: EmitterVisitorContext, separator: string): void;
63
- visitAllObjects<T>(handler: (t: T) => void, expressions: T[], ctx: EmitterVisitorContext, separator: string): void;
64
- visitAllStatements(statements: o.Statement[], ctx: EmitterVisitorContext): void;
65
- }
66
- export declare function escapeIdentifier(input: string, escapeDollar: boolean, alwaysQuote?: boolean): any;
@@ -1,19 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC 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
- import { AbstractEmitterVisitor, EmitterVisitorContext } from './abstract_emitter';
9
- import * as o from './output_ast';
10
- export declare abstract class AbstractJsEmitterVisitor extends AbstractEmitterVisitor {
11
- constructor();
12
- visitWrappedNodeExpr(ast: o.WrappedNodeExpr<any>, ctx: EmitterVisitorContext): any;
13
- visitDeclareVarStmt(stmt: o.DeclareVarStmt, ctx: EmitterVisitorContext): any;
14
- visitTaggedTemplateExpr(ast: o.TaggedTemplateExpr, ctx: EmitterVisitorContext): any;
15
- visitFunctionExpr(ast: o.FunctionExpr, ctx: EmitterVisitorContext): any;
16
- visitDeclareFunctionStmt(stmt: o.DeclareFunctionStmt, ctx: EmitterVisitorContext): any;
17
- visitLocalizedString(ast: o.LocalizedString, ctx: EmitterVisitorContext): any;
18
- private _visitParams;
19
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC 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
- import * as o from './output_ast';
9
- export declare type MapEntry = {
10
- key: string;
11
- quoted: boolean;
12
- value: o.Expression;
13
- };
14
- export declare type MapLiteral = MapEntry[];
15
- export declare function mapEntry(key: string, value: o.Expression): MapEntry;
16
- export declare function mapLiteral(obj: {
17
- [key: string]: o.Expression;
18
- }, quoted?: boolean): o.Expression;