@angular/compiler 14.0.0-next.9 → 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 (148) hide show
  1. package/esm2020/src/compiler.mjs +3 -2
  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 +74 -42
  7. package/esm2020/src/ml_parser/html_whitespaces.mjs +2 -2
  8. package/esm2020/src/ml_parser/lexer.mjs +36 -36
  9. package/esm2020/src/ml_parser/parser.mjs +41 -41
  10. package/esm2020/src/render3/partial/api.mjs +1 -1
  11. package/esm2020/src/render3/partial/class_metadata.mjs +1 -1
  12. package/esm2020/src/render3/partial/component.mjs +28 -37
  13. package/esm2020/src/render3/partial/directive.mjs +6 -3
  14. package/esm2020/src/render3/partial/factory.mjs +1 -1
  15. package/esm2020/src/render3/partial/injectable.mjs +1 -1
  16. package/esm2020/src/render3/partial/injector.mjs +1 -1
  17. package/esm2020/src/render3/partial/ng_module.mjs +3 -3
  18. package/esm2020/src/render3/partial/pipe.mjs +6 -3
  19. package/esm2020/src/render3/r3_ast.mjs +3 -3
  20. package/esm2020/src/render3/r3_factory.mjs +6 -6
  21. package/esm2020/src/render3/r3_identifiers.mjs +2 -1
  22. package/esm2020/src/render3/r3_pipe_compiler.mjs +5 -1
  23. package/esm2020/src/render3/util.mjs +4 -4
  24. package/esm2020/src/render3/view/api.mjs +7 -2
  25. package/esm2020/src/render3/view/compiler.mjs +45 -35
  26. package/esm2020/src/render3/view/i18n/get_msg_utils.mjs +58 -5
  27. package/esm2020/src/render3/view/i18n/meta.mjs +4 -4
  28. package/esm2020/src/render3/view/i18n/util.mjs +2 -2
  29. package/esm2020/src/render3/view/style_parser.mjs +19 -19
  30. package/esm2020/src/render3/view/styling_builder.mjs +6 -6
  31. package/esm2020/src/render3/view/template.mjs +25 -25
  32. package/esm2020/src/render3/view/util.mjs +14 -5
  33. package/esm2020/src/selector.mjs +8 -8
  34. package/esm2020/src/template_parser/binding_parser.mjs +8 -8
  35. package/esm2020/src/util.mjs +8 -8
  36. package/esm2020/src/version.mjs +1 -1
  37. package/fesm2015/compiler.mjs +416 -301
  38. package/fesm2015/compiler.mjs.map +1 -1
  39. package/fesm2015/testing.mjs +1 -1
  40. package/fesm2020/compiler.mjs +424 -314
  41. package/fesm2020/compiler.mjs.map +1 -1
  42. package/fesm2020/testing.mjs +1 -1
  43. package/index.d.ts +4964 -5
  44. package/package.json +3 -3
  45. package/testing/index.d.ts +22 -5
  46. package/compiler.d.ts +0 -8
  47. package/public_api.d.ts +0 -13
  48. package/src/assertions.d.ts +0 -8
  49. package/src/chars.d.ts +0 -75
  50. package/src/compiler.d.ts +0 -77
  51. package/src/compiler_facade_interface.d.ts +0 -284
  52. package/src/compiler_util/expression_converter.d.ts +0 -71
  53. package/src/config.d.ts +0 -25
  54. package/src/constant_pool.d.ts +0 -37
  55. package/src/core.d.ts +0 -216
  56. package/src/expression_parser/ast.d.ts +0 -440
  57. package/src/expression_parser/lexer.d.ts +0 -47
  58. package/src/expression_parser/parser.d.ts +0 -315
  59. package/src/i18n/big_integer.d.ts +0 -108
  60. package/src/i18n/digest.d.ts +0 -44
  61. package/src/i18n/extractor_merger.d.ts +0 -27
  62. package/src/i18n/i18n_ast.d.ts +0 -148
  63. package/src/i18n/i18n_html_parser.d.ts +0 -19
  64. package/src/i18n/i18n_parser.d.ts +0 -18
  65. package/src/i18n/index.d.ts +0 -15
  66. package/src/i18n/message_bundle.d.ts +0 -28
  67. package/src/i18n/parse_util.d.ts +0 -14
  68. package/src/i18n/serializers/placeholder.d.ts +0 -25
  69. package/src/i18n/serializers/serializer.d.ts +0 -46
  70. package/src/i18n/serializers/xliff.d.ts +0 -19
  71. package/src/i18n/serializers/xliff2.d.ts +0 -19
  72. package/src/i18n/serializers/xmb.d.ts +0 -22
  73. package/src/i18n/serializers/xml_helper.d.ts +0 -52
  74. package/src/i18n/serializers/xtb.d.ts +0 -20
  75. package/src/i18n/translation_bundle.d.ts +0 -27
  76. package/src/injectable_compiler_2.d.ts +0 -24
  77. package/src/jit_compiler_facade.d.ts +0 -46
  78. package/src/ml_parser/ast.d.ts +0 -89
  79. package/src/ml_parser/entities.d.ts +0 -9
  80. package/src/ml_parser/html_parser.d.ts +0 -13
  81. package/src/ml_parser/html_tags.d.ts +0 -33
  82. package/src/ml_parser/html_whitespaces.d.ts +0 -45
  83. package/src/ml_parser/icu_ast_expander.d.ts +0 -42
  84. package/src/ml_parser/interpolation_config.d.ts +0 -14
  85. package/src/ml_parser/lexer.d.ts +0 -114
  86. package/src/ml_parser/parser.d.ts +0 -26
  87. package/src/ml_parser/tags.d.ts +0 -29
  88. package/src/ml_parser/tokens.d.ts +0 -141
  89. package/src/ml_parser/xml_parser.d.ts +0 -13
  90. package/src/ml_parser/xml_tags.d.ts +0 -24
  91. package/src/output/abstract_emitter.d.ts +0 -66
  92. package/src/output/abstract_js_emitter.d.ts +0 -19
  93. package/src/output/map_util.d.ts +0 -18
  94. package/src/output/output_ast.d.ts +0 -575
  95. package/src/output/output_jit.d.ts +0 -73
  96. package/src/output/output_jit_trusted_types.d.ts +0 -43
  97. package/src/output/source_map.d.ts +0 -29
  98. package/src/parse_util.d.ts +0 -75
  99. package/src/render3/partial/api.d.ts +0 -441
  100. package/src/render3/partial/class_metadata.d.ts +0 -10
  101. package/src/render3/partial/component.d.ts +0 -39
  102. package/src/render3/partial/directive.d.ts +0 -13
  103. package/src/render3/partial/factory.d.ts +0 -3
  104. package/src/render3/partial/injectable.d.ts +0 -19
  105. package/src/render3/partial/injector.d.ts +0 -3
  106. package/src/render3/partial/ng_module.d.ts +0 -3
  107. package/src/render3/partial/pipe.d.ts +0 -12
  108. package/src/render3/partial/util.d.ts +0 -33
  109. package/src/render3/r3_ast.d.ts +0 -211
  110. package/src/render3/r3_class_metadata_compiler.d.ts +0 -35
  111. package/src/render3/r3_factory.d.ts +0 -94
  112. package/src/render3/r3_identifiers.d.ts +0 -182
  113. package/src/render3/r3_injector_compiler.d.ts +0 -18
  114. package/src/render3/r3_jit.d.ts +0 -22
  115. package/src/render3/r3_module_compiler.d.ts +0 -103
  116. package/src/render3/r3_pipe_compiler.d.ts +0 -50
  117. package/src/render3/r3_template_transform.d.ts +0 -24
  118. package/src/render3/util.d.ts +0 -94
  119. package/src/render3/view/api.d.ts +0 -328
  120. package/src/render3/view/compiler.d.ts +0 -86
  121. package/src/render3/view/i18n/context.d.ts +0 -68
  122. package/src/render3/view/i18n/get_msg_utils.d.ts +0 -13
  123. package/src/render3/view/i18n/icu_serializer.d.ts +0 -9
  124. package/src/render3/view/i18n/localize_utils.d.ts +0 -24
  125. package/src/render3/view/i18n/meta.d.ts +0 -78
  126. package/src/render3/view/i18n/util.d.ts +0 -78
  127. package/src/render3/view/style_parser.d.ts +0 -18
  128. package/src/render3/view/styling_builder.d.ts +0 -211
  129. package/src/render3/view/t2_api.d.ts +0 -152
  130. package/src/render3/view/t2_binder.d.ts +0 -57
  131. package/src/render3/view/template.d.ts +0 -450
  132. package/src/render3/view/util.d.ts +0 -94
  133. package/src/resource_loader.d.ts +0 -17
  134. package/src/schema/dom_element_schema_registry.d.ts +0 -45
  135. package/src/schema/dom_security_schema.d.ts +0 -11
  136. package/src/schema/element_schema_registry.d.ts +0 -29
  137. package/src/schema/trusted_types_sinks.d.ts +0 -15
  138. package/src/selector.d.ts +0 -105
  139. package/src/shadow_css.d.ts +0 -76
  140. package/src/style_url_resolver.d.ts +0 -8
  141. package/src/template_parser/binding_parser.d.ts +0 -91
  142. package/src/template_parser/template_preparser.d.ts +0 -24
  143. package/src/util.d.ts +0 -42
  144. package/src/version.d.ts +0 -14
  145. package/testing/package.json +0 -9
  146. package/testing/public_api.d.ts +0 -13
  147. package/testing/src/testing.d.ts +0 -23
  148. package/testing/testing.d.ts +0 -4
@@ -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 type SourceMap = {
9
- version: number;
10
- file?: string;
11
- sourceRoot: string;
12
- sources: string[];
13
- sourcesContent: (string | null)[];
14
- mappings: string;
15
- };
16
- export declare class SourceMapGenerator {
17
- private file;
18
- private sourcesContent;
19
- private lines;
20
- private lastCol0;
21
- private hasMappings;
22
- constructor(file?: string | null);
23
- addSource(url: string, content?: string | null): this;
24
- addLine(): this;
25
- addMapping(col0: number, sourceUrl?: string, sourceLine0?: number, sourceCol0?: number): this;
26
- toJSON(): SourceMap | null;
27
- toJsComment(): string;
28
- }
29
- export declare function toBase64String(value: string): string;
@@ -1,75 +0,0 @@
1
- export declare class ParseLocation {
2
- file: ParseSourceFile;
3
- offset: number;
4
- line: number;
5
- col: number;
6
- constructor(file: ParseSourceFile, offset: number, line: number, col: number);
7
- toString(): string;
8
- moveBy(delta: number): ParseLocation;
9
- getContext(maxChars: number, maxLines: number): {
10
- before: string;
11
- after: string;
12
- } | null;
13
- }
14
- export declare class ParseSourceFile {
15
- content: string;
16
- url: string;
17
- constructor(content: string, url: string);
18
- }
19
- export declare class ParseSourceSpan {
20
- start: ParseLocation;
21
- end: ParseLocation;
22
- fullStart: ParseLocation;
23
- details: string | null;
24
- /**
25
- * Create an object that holds information about spans of tokens/nodes captured during
26
- * lexing/parsing of text.
27
- *
28
- * @param start
29
- * The location of the start of the span (having skipped leading trivia).
30
- * Skipping leading trivia makes source-spans more "user friendly", since things like HTML
31
- * elements will appear to begin at the start of the opening tag, rather than at the start of any
32
- * leading trivia, which could include newlines.
33
- *
34
- * @param end
35
- * The location of the end of the span.
36
- *
37
- * @param fullStart
38
- * The start of the token without skipping the leading trivia.
39
- * This is used by tooling that splits tokens further, such as extracting Angular interpolations
40
- * from text tokens. Such tooling creates new source-spans relative to the original token's
41
- * source-span. If leading trivia characters have been skipped then the new source-spans may be
42
- * incorrectly offset.
43
- *
44
- * @param details
45
- * Additional information (such as identifier names) that should be associated with the span.
46
- */
47
- constructor(start: ParseLocation, end: ParseLocation, fullStart?: ParseLocation, details?: string | null);
48
- toString(): string;
49
- }
50
- export declare enum ParseErrorLevel {
51
- WARNING = 0,
52
- ERROR = 1
53
- }
54
- export declare class ParseError {
55
- span: ParseSourceSpan;
56
- msg: string;
57
- level: ParseErrorLevel;
58
- constructor(span: ParseSourceSpan, msg: string, level?: ParseErrorLevel);
59
- contextualMessage(): string;
60
- toString(): string;
61
- }
62
- /**
63
- * Generates Source Span object for a given R3 Type for JIT mode.
64
- *
65
- * @param kind Component or Directive.
66
- * @param typeName name of the Component or Directive.
67
- * @param sourceUrl reference to Component or Directive source.
68
- * @returns instance of ParseSourceSpan that represent a given Component or Directive.
69
- */
70
- export declare function r3JitTypeSourceSpan(kind: string, typeName: string, sourceUrl: string): ParseSourceSpan;
71
- export declare function identifierName(compileIdentifier: CompileIdentifierMetadata | null | undefined): string | null;
72
- export interface CompileIdentifierMetadata {
73
- reference: any;
74
- }
75
- export declare function sanitizeIdentifier(name: string): string;
@@ -1,441 +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 { ChangeDetectionStrategy, ViewEncapsulation } from '../../core';
9
- import * as o from '../../output/output_ast';
10
- export interface R3PartialDeclaration {
11
- /**
12
- * The minimum version of the compiler that can process this partial declaration.
13
- */
14
- minVersion: string;
15
- /**
16
- * Version number of the Angular compiler that was used to compile this declaration. The linker
17
- * will be able to detect which version a library is using and interpret its metadata accordingly.
18
- */
19
- version: string;
20
- /**
21
- * A reference to the `@angular/core` ES module, which allows access
22
- * to all Angular exports, including Ivy instructions.
23
- */
24
- ngImport: o.Expression;
25
- /**
26
- * Reference to the decorated class, which is subject to this partial declaration.
27
- */
28
- type: o.Expression;
29
- }
30
- /**
31
- * Describes the shape of the object that the `ɵɵngDeclareDirective()` function accepts.
32
- */
33
- export interface R3DeclareDirectiveMetadata extends R3PartialDeclaration {
34
- /**
35
- * Unparsed selector of the directive.
36
- */
37
- selector?: string;
38
- /**
39
- * A mapping of inputs from class property names to binding property names, or to a tuple of
40
- * binding property name and class property name if the names are different.
41
- */
42
- inputs?: {
43
- [classPropertyName: string]: string | [string, string];
44
- };
45
- /**
46
- * A mapping of outputs from class property names to binding property names.
47
- */
48
- outputs?: {
49
- [classPropertyName: string]: string;
50
- };
51
- /**
52
- * Information about host bindings present on the component.
53
- */
54
- host?: {
55
- /**
56
- * A mapping of attribute names to their value expression.
57
- */
58
- attributes?: {
59
- [key: string]: o.Expression;
60
- };
61
- /**
62
- * A mapping of event names to their unparsed event handler expression.
63
- */
64
- listeners: {
65
- [key: string]: string;
66
- };
67
- /**
68
- * A mapping of bound properties to their unparsed binding expression.
69
- */
70
- properties?: {
71
- [key: string]: string;
72
- };
73
- /**
74
- * The value of the class attribute, if present. This is stored outside of `attributes` as its
75
- * string value must be known statically.
76
- */
77
- classAttribute?: string;
78
- /**
79
- * The value of the style attribute, if present. This is stored outside of `attributes` as its
80
- * string value must be known statically.
81
- */
82
- styleAttribute?: string;
83
- };
84
- /**
85
- * Information about the content queries made by the directive.
86
- */
87
- queries?: R3DeclareQueryMetadata[];
88
- /**
89
- * Information about the view queries made by the directive.
90
- */
91
- viewQueries?: R3DeclareQueryMetadata[];
92
- /**
93
- * The list of providers provided by the directive.
94
- */
95
- providers?: o.Expression;
96
- /**
97
- * The names by which the directive is exported.
98
- */
99
- exportAs?: string[];
100
- /**
101
- * Whether the directive has an inheritance clause. Defaults to false.
102
- */
103
- usesInheritance?: boolean;
104
- /**
105
- * Whether the directive implements the `ngOnChanges` hook. Defaults to false.
106
- */
107
- usesOnChanges?: boolean;
108
- /**
109
- * Whether the directive is standalone. Defaults to false.
110
- */
111
- isStandalone?: boolean;
112
- }
113
- /**
114
- * Describes the shape of the object that the `ɵɵngDeclareComponent()` function accepts.
115
- */
116
- export interface R3DeclareComponentMetadata extends R3DeclareDirectiveMetadata {
117
- /**
118
- * The component's unparsed template string as opaque expression. The template is represented
119
- * using either a string literal or template literal without substitutions, but its value is
120
- * not read directly. Instead, the template parser is given the full source file's text and
121
- * the range of this expression to parse directly from source.
122
- */
123
- template: o.Expression;
124
- /**
125
- * Whether the template was inline (using `template`) or external (using `templateUrl`).
126
- * Defaults to false.
127
- */
128
- isInline?: boolean;
129
- /**
130
- * CSS from inline styles and included styleUrls.
131
- */
132
- styles?: string[];
133
- /**
134
- * List of components which matched in the template, including sufficient
135
- * metadata for each directive to attribute bindings and references within
136
- * the template to each directive specifically, if the runtime instructions
137
- * support this.
138
- */
139
- components?: R3DeclareUsedDirectiveMetadata[];
140
- /**
141
- * List of directives which matched in the template, including sufficient
142
- * metadata for each directive to attribute bindings and references within
143
- * the template to each directive specifically, if the runtime instructions
144
- * support this.
145
- */
146
- directives?: R3DeclareUsedDirectiveMetadata[];
147
- /**
148
- * A map of pipe names to an expression referencing the pipe type (possibly a forward reference
149
- * wrapped in a `forwardRef` invocation) which are used in the template.
150
- */
151
- pipes?: {
152
- [pipeName: string]: o.Expression | (() => o.Expression);
153
- };
154
- /**
155
- * The list of view providers defined in the component.
156
- */
157
- viewProviders?: o.Expression;
158
- /**
159
- * A collection of animation triggers that will be used in the component template.
160
- */
161
- animations?: o.Expression;
162
- /**
163
- * Strategy used for detecting changes in the component.
164
- * Defaults to `ChangeDetectionStrategy.Default`.
165
- */
166
- changeDetection?: ChangeDetectionStrategy;
167
- /**
168
- * An encapsulation policy for the component's styling.
169
- * Defaults to `ViewEncapsulation.Emulated`.
170
- */
171
- encapsulation?: ViewEncapsulation;
172
- /**
173
- * Overrides the default interpolation start and end delimiters. Defaults to {{ and }}.
174
- */
175
- interpolation?: [string, string];
176
- /**
177
- * Whether whitespace in the template should be preserved. Defaults to false.
178
- */
179
- preserveWhitespaces?: boolean;
180
- }
181
- export interface R3DeclareUsedDirectiveMetadata {
182
- /**
183
- * Selector of the directive.
184
- */
185
- selector: string;
186
- /**
187
- * Reference to the directive class (possibly a forward reference wrapped in a `forwardRef`
188
- * invocation).
189
- */
190
- type: o.Expression | (() => o.Expression);
191
- /**
192
- * Property names of the directive's inputs.
193
- */
194
- inputs?: string[];
195
- /**
196
- * Event names of the directive's outputs.
197
- */
198
- outputs?: string[];
199
- /**
200
- * Names by which this directive exports itself for references.
201
- */
202
- exportAs?: string[];
203
- }
204
- export interface R3DeclareQueryMetadata {
205
- /**
206
- * Name of the property on the class to update with query results.
207
- */
208
- propertyName: string;
209
- /**
210
- * Whether to read only the first matching result, or an array of results. Defaults to false.
211
- */
212
- first?: boolean;
213
- /**
214
- * Either an expression representing a type (possibly wrapped in a `forwardRef()`) or
215
- * `InjectionToken` for the query predicate, or a set of string selectors.
216
- */
217
- predicate: o.Expression | string[];
218
- /**
219
- * Whether to include only direct children or all descendants. Defaults to false.
220
- */
221
- descendants?: boolean;
222
- /**
223
- * True to only fire changes if there are underlying changes to the query.
224
- */
225
- emitDistinctChangesOnly?: boolean;
226
- /**
227
- * An expression representing a type to read from each matched node, or null if the default value
228
- * for a given node is to be returned.
229
- */
230
- read?: o.Expression;
231
- /**
232
- * Whether or not this query should collect only static results. Defaults to false.
233
- *
234
- * If static is true, the query's results will be set on the component after nodes are created,
235
- * but before change detection runs. This means that any results that relied upon change detection
236
- * to run (e.g. results inside *ngIf or *ngFor views) will not be collected. Query results are
237
- * available in the ngOnInit hook.
238
- *
239
- * If static is false, the query's results will be set on the component after change detection
240
- * runs. This means that the query results can contain nodes inside *ngIf or *ngFor views, but
241
- * the results will not be available in the ngOnInit hook (only in the ngAfterContentInit for
242
- * content hooks and ngAfterViewInit for view hooks).
243
- */
244
- static?: boolean;
245
- }
246
- /**
247
- * Describes the shape of the objects that the `ɵɵngDeclareNgModule()` accepts.
248
- */
249
- export interface R3DeclareNgModuleMetadata extends R3PartialDeclaration {
250
- /**
251
- * An array of expressions representing the bootstrap components specified by the module.
252
- */
253
- bootstrap?: o.Expression[];
254
- /**
255
- * An array of expressions representing the directives and pipes declared by the module.
256
- */
257
- declarations?: o.Expression[];
258
- /**
259
- * An array of expressions representing the imports of the module.
260
- */
261
- imports?: o.Expression[];
262
- /**
263
- * An array of expressions representing the exports of the module.
264
- */
265
- exports?: o.Expression[];
266
- /**
267
- * The set of schemas that declare elements to be allowed in the NgModule.
268
- */
269
- schemas?: o.Expression[];
270
- /** Unique ID or expression representing the unique ID of an NgModule. */
271
- id?: o.Expression;
272
- }
273
- /**
274
- * Describes the shape of the objects that the `ɵɵngDeclareInjector()` accepts.
275
- */
276
- export interface R3DeclareInjectorMetadata extends R3PartialDeclaration {
277
- /**
278
- * The list of providers provided by the injector.
279
- */
280
- providers?: o.Expression;
281
- /**
282
- * The list of imports into the injector.
283
- */
284
- imports?: o.Expression[];
285
- }
286
- /**
287
- * Describes the shape of the object that the `ɵɵngDeclarePipe()` function accepts.
288
- *
289
- * This interface serves primarily as documentation, as conformance to this interface is not
290
- * enforced during linking.
291
- */
292
- export interface R3DeclarePipeMetadata extends R3PartialDeclaration {
293
- /**
294
- * The name to use in templates to refer to this pipe.
295
- */
296
- name: string;
297
- /**
298
- * Whether this pipe is "pure".
299
- *
300
- * A pure pipe's `transform()` method is only invoked when its input arguments change.
301
- *
302
- * Default: true.
303
- */
304
- pure?: boolean;
305
- /**
306
- * Whether the pipe is standalone.
307
- *
308
- * Default: false.
309
- */
310
- isStandalone?: boolean;
311
- }
312
- /**
313
- * Describes the shape of the object that the `ɵɵngDeclareFactory()` function accepts.
314
- *
315
- * This interface serves primarily as documentation, as conformance to this interface is not
316
- * enforced during linking.
317
- */
318
- export interface R3DeclareFactoryMetadata extends R3PartialDeclaration {
319
- /**
320
- * A collection of dependencies that this factory relies upon.
321
- *
322
- * If this is `null`, then the type's constructor is nonexistent and will be inherited from an
323
- * ancestor of the type.
324
- *
325
- * If this is `'invalid'`, then one or more of the parameters wasn't resolvable and any attempt to
326
- * use these deps will result in a runtime error.
327
- */
328
- deps: R3DeclareDependencyMetadata[] | 'invalid' | null;
329
- /**
330
- * Type of the target being created by the factory.
331
- */
332
- target: FactoryTarget;
333
- }
334
- export declare enum FactoryTarget {
335
- Directive = 0,
336
- Component = 1,
337
- Injectable = 2,
338
- Pipe = 3,
339
- NgModule = 4
340
- }
341
- /**
342
- * Describes the shape of the object that the `ɵɵngDeclareInjectable()` function accepts.
343
- *
344
- * This interface serves primarily as documentation, as conformance to this interface is not
345
- * enforced during linking.
346
- */
347
- export interface R3DeclareInjectableMetadata extends R3PartialDeclaration {
348
- /**
349
- * If provided, specifies that the declared injectable belongs to a particular injector:
350
- * - `InjectorType` such as `NgModule`,
351
- * - `'root'` the root injector
352
- * - `'any'` all injectors.
353
- * If not provided, then it does not belong to any injector. Must be explicitly listed in the
354
- * providers of an injector.
355
- */
356
- providedIn?: o.Expression;
357
- /**
358
- * If provided, an expression that evaluates to a class to use when creating an instance of this
359
- * injectable.
360
- */
361
- useClass?: o.Expression;
362
- /**
363
- * If provided, an expression that evaluates to a function to use when creating an instance of
364
- * this injectable.
365
- */
366
- useFactory?: o.Expression;
367
- /**
368
- * If provided, an expression that evaluates to a token of another injectable that this injectable
369
- * aliases.
370
- */
371
- useExisting?: o.Expression;
372
- /**
373
- * If provided, an expression that evaluates to the value of the instance of this injectable.
374
- */
375
- useValue?: o.Expression;
376
- /**
377
- * An array of dependencies to support instantiating this injectable via `useClass` or
378
- * `useFactory`.
379
- */
380
- deps?: R3DeclareDependencyMetadata[];
381
- }
382
- /**
383
- * Metadata indicating how a dependency should be injected into a factory.
384
- */
385
- export interface R3DeclareDependencyMetadata {
386
- /**
387
- * An expression representing the token or value to be injected, or `null` if the dependency is
388
- * not valid.
389
- *
390
- * If this dependency is due to the `@Attribute()` decorator, then this is an expression
391
- * evaluating to the name of the attribute.
392
- */
393
- token: o.Expression | null;
394
- /**
395
- * Whether the dependency is injecting an attribute value.
396
- * Default: false.
397
- */
398
- attribute?: boolean;
399
- /**
400
- * Whether the dependency has an @Host qualifier.
401
- * Default: false,
402
- */
403
- host?: boolean;
404
- /**
405
- * Whether the dependency has an @Optional qualifier.
406
- * Default: false,
407
- */
408
- optional?: boolean;
409
- /**
410
- * Whether the dependency has an @Self qualifier.
411
- * Default: false,
412
- */
413
- self?: boolean;
414
- /**
415
- * Whether the dependency has an @SkipSelf qualifier.
416
- * Default: false,
417
- */
418
- skipSelf?: boolean;
419
- }
420
- /**
421
- * Describes the shape of the object that the `ɵɵngDeclareClassMetadata()` function accepts.
422
- *
423
- * This interface serves primarily as documentation, as conformance to this interface is not
424
- * enforced during linking.
425
- */
426
- export interface R3DeclareClassMetadata extends R3PartialDeclaration {
427
- /**
428
- * The Angular decorators of the class.
429
- */
430
- decorators: o.Expression;
431
- /**
432
- * Optionally specifies the constructor parameters, their types and the Angular decorators of each
433
- * parameter. This property is omitted if the class does not have a constructor.
434
- */
435
- ctorParameters?: o.Expression;
436
- /**
437
- * Optionally specifies the Angular decorators applied to the class properties. This property is
438
- * omitted if no properties have any decorators.
439
- */
440
- propDecorators?: o.Expression;
441
- }
@@ -1,10 +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/output_ast';
9
- import { R3ClassMetadata } from '../r3_class_metadata_compiler';
10
- export declare function compileDeclareClassMetadata(metadata: R3ClassMetadata): o.Expression;
@@ -1,39 +0,0 @@
1
- import * as o from '../../output/output_ast';
2
- import { R3CompiledExpression } from '../util';
3
- import { R3ComponentMetadata } from '../view/api';
4
- import { ParsedTemplate } from '../view/template';
5
- import { DefinitionMap } from '../view/util';
6
- import { R3DeclareComponentMetadata } from './api';
7
- export interface DeclareComponentTemplateInfo {
8
- /**
9
- * The string contents of the template.
10
- *
11
- * This is the "logical" template string, after expansion of any escaped characters (for inline
12
- * templates). This may differ from the actual template bytes as they appear in the .ts file.
13
- */
14
- content: string;
15
- /**
16
- * A full path to the file which contains the template.
17
- *
18
- * This can be either the original .ts file if the template is inline, or the .html file if an
19
- * external file was used.
20
- */
21
- sourceUrl: string;
22
- /**
23
- * Whether the template was inline (using `template`) or external (using `templateUrl`).
24
- */
25
- isInline: boolean;
26
- /**
27
- * If the template was defined inline by a direct string literal, then this is that literal
28
- * expression. Otherwise `null`, if the template was not defined inline or was not a literal.
29
- */
30
- inlineTemplateLiteralExpression: o.Expression | null;
31
- }
32
- /**
33
- * Compile a component declaration defined by the `R3ComponentMetadata`.
34
- */
35
- export declare function compileDeclareComponentFromMetadata(meta: R3ComponentMetadata, template: ParsedTemplate, additionalTemplateInfo: DeclareComponentTemplateInfo): R3CompiledExpression;
36
- /**
37
- * Gathers the declaration fields for a component into a `DefinitionMap`.
38
- */
39
- export declare function createComponentDefinitionMap(meta: R3ComponentMetadata, template: ParsedTemplate, templateInfo: DeclareComponentTemplateInfo): DefinitionMap<R3DeclareComponentMetadata>;
@@ -1,13 +0,0 @@
1
- import { R3CompiledExpression } from '../util';
2
- import { R3DirectiveMetadata } from '../view/api';
3
- import { DefinitionMap } from '../view/util';
4
- import { R3DeclareDirectiveMetadata } from './api';
5
- /**
6
- * Compile a directive declaration defined by the `R3DirectiveMetadata`.
7
- */
8
- export declare function compileDeclareDirectiveFromMetadata(meta: R3DirectiveMetadata): R3CompiledExpression;
9
- /**
10
- * Gathers the declaration fields for a directive into a `DefinitionMap`. This allows for reusing
11
- * this logic for components, as they extend the directive metadata.
12
- */
13
- export declare function createDirectiveDefinitionMap(meta: R3DirectiveMetadata): DefinitionMap<R3DeclareDirectiveMetadata>;
@@ -1,3 +0,0 @@
1
- import { R3FactoryMetadata } from '../r3_factory';
2
- import { R3CompiledExpression } from '../util';
3
- export declare function compileDeclareFactoryFunction(meta: R3FactoryMetadata): R3CompiledExpression;
@@ -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 { R3InjectableMetadata } from '../../injectable_compiler_2';
9
- import { R3CompiledExpression } from '../util';
10
- import { DefinitionMap } from '../view/util';
11
- import { R3DeclareInjectableMetadata } from './api';
12
- /**
13
- * Compile a Injectable declaration defined by the `R3InjectableMetadata`.
14
- */
15
- export declare function compileDeclareInjectableFromMetadata(meta: R3InjectableMetadata): R3CompiledExpression;
16
- /**
17
- * Gathers the declaration fields for a Injectable into a `DefinitionMap`.
18
- */
19
- export declare function createInjectableDefinitionMap(meta: R3InjectableMetadata): DefinitionMap<R3DeclareInjectableMetadata>;
@@ -1,3 +0,0 @@
1
- import { R3InjectorMetadata } from '../r3_injector_compiler';
2
- import { R3CompiledExpression } from '../util';
3
- export declare function compileDeclareInjectorFromMetadata(meta: R3InjectorMetadata): R3CompiledExpression;
@@ -1,3 +0,0 @@
1
- import { R3NgModuleMetadata } from '../r3_module_compiler';
2
- import { R3CompiledExpression } from '../util';
3
- export declare function compileDeclareNgModuleFromMetadata(meta: R3NgModuleMetadata): R3CompiledExpression;
@@ -1,12 +0,0 @@
1
- import { R3PipeMetadata } from '../r3_pipe_compiler';
2
- import { R3CompiledExpression } from '../util';
3
- import { DefinitionMap } from '../view/util';
4
- import { R3DeclarePipeMetadata } from './api';
5
- /**
6
- * Compile a Pipe declaration defined by the `R3PipeMetadata`.
7
- */
8
- export declare function compileDeclarePipeFromMetadata(meta: R3PipeMetadata): R3CompiledExpression;
9
- /**
10
- * Gathers the declaration fields for a Pipe into a `DefinitionMap`.
11
- */
12
- export declare function createPipeDefinitionMap(meta: R3PipeMetadata): DefinitionMap<R3DeclarePipeMetadata>;