1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | export declare class AbsoluteSourceSpan {
|
13 | readonly start: number;
|
14 | readonly end: number;
|
15 | constructor(start: number, end: number);
|
16 | }
|
17 |
|
18 | /**
|
19 | * A data structure which captures the animation trigger names that are statically resolvable
|
20 | * and whether some names could not be statically evaluated.
|
21 | */
|
22 | export declare interface AnimationTriggerNames {
|
23 | includesDynamicAnimations: boolean;
|
24 | staticTriggerNames: string[];
|
25 | }
|
26 |
|
27 | declare function areAllEquivalent<T extends {
|
28 | isEquivalent(other: T): boolean;
|
29 | }>(base: T[], other: T[]): boolean;
|
30 |
|
31 | export declare class ArrayType extends Type {
|
32 | of: Type;
|
33 | constructor(of: Type, modifiers?: TypeModifier);
|
34 | visitType(visitor: TypeVisitor, context: any): any;
|
35 | }
|
36 |
|
37 | declare function arrowFn(params: FnParam[], body: Expression | Statement[], type?: Type | null, sourceSpan?: ParseSourceSpan | null): ArrowFunctionExpr;
|
38 |
|
39 | export declare class ArrowFunctionExpr extends Expression {
|
40 | params: FnParam[];
|
41 | body: Expression | Statement[];
|
42 | constructor(params: FnParam[], body: Expression | Statement[], type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
43 | isEquivalent(e: Expression): boolean;
|
44 | isConstant(): boolean;
|
45 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
46 | clone(): Expression;
|
47 | toDeclStmt(name: string, modifiers?: StmtModifier): DeclareVarStmt;
|
48 | }
|
49 |
|
50 | export declare abstract class AST {
|
51 | span: ParseSpan;
|
52 | |
53 |
|
54 |
|
55 | sourceSpan: AbsoluteSourceSpan;
|
56 | constructor(span: ParseSpan,
|
57 | |
58 |
|
59 |
|
60 | sourceSpan: AbsoluteSourceSpan);
|
61 | abstract visit(visitor: AstVisitor, context?: any): any;
|
62 | toString(): string;
|
63 | }
|
64 |
|
65 | export declare class AstMemoryEfficientTransformer implements AstVisitor {
|
66 | visitImplicitReceiver(ast: ImplicitReceiver, context: any): AST;
|
67 | visitThisReceiver(ast: ThisReceiver, context: any): AST;
|
68 | visitInterpolation(ast: Interpolation, context: any): Interpolation;
|
69 | visitLiteralPrimitive(ast: LiteralPrimitive, context: any): AST;
|
70 | visitPropertyRead(ast: PropertyRead, context: any): AST;
|
71 | visitPropertyWrite(ast: PropertyWrite, context: any): AST;
|
72 | visitSafePropertyRead(ast: SafePropertyRead, context: any): AST;
|
73 | visitLiteralArray(ast: LiteralArray, context: any): AST;
|
74 | visitLiteralMap(ast: LiteralMap, context: any): AST;
|
75 | visitUnary(ast: Unary, context: any): AST;
|
76 | visitBinary(ast: Binary, context: any): AST;
|
77 | visitPrefixNot(ast: PrefixNot, context: any): AST;
|
78 | visitTypeofExpresion(ast: TypeofExpression, context: any): AST;
|
79 | visitNonNullAssert(ast: NonNullAssert, context: any): AST;
|
80 | visitConditional(ast: Conditional, context: any): AST;
|
81 | visitPipe(ast: BindingPipe, context: any): AST;
|
82 | visitKeyedRead(ast: KeyedRead, context: any): AST;
|
83 | visitKeyedWrite(ast: KeyedWrite, context: any): AST;
|
84 | visitAll(asts: any[]): any[];
|
85 | visitChain(ast: Chain, context: any): AST;
|
86 | visitCall(ast: Call, context: any): AST;
|
87 | visitSafeCall(ast: SafeCall, context: any): AST;
|
88 | visitSafeKeyedRead(ast: SafeKeyedRead, context: any): AST;
|
89 | }
|
90 |
|
91 | export declare class AstTransformer implements AstVisitor {
|
92 | visitImplicitReceiver(ast: ImplicitReceiver, context: any): AST;
|
93 | visitThisReceiver(ast: ThisReceiver, context: any): AST;
|
94 | visitInterpolation(ast: Interpolation, context: any): AST;
|
95 | visitLiteralPrimitive(ast: LiteralPrimitive, context: any): AST;
|
96 | visitPropertyRead(ast: PropertyRead, context: any): AST;
|
97 | visitPropertyWrite(ast: PropertyWrite, context: any): AST;
|
98 | visitSafePropertyRead(ast: SafePropertyRead, context: any): AST;
|
99 | visitLiteralArray(ast: LiteralArray, context: any): AST;
|
100 | visitLiteralMap(ast: LiteralMap, context: any): AST;
|
101 | visitUnary(ast: Unary, context: any): AST;
|
102 | visitBinary(ast: Binary, context: any): AST;
|
103 | visitPrefixNot(ast: PrefixNot, context: any): AST;
|
104 | visitTypeofExpresion(ast: TypeofExpression, context: any): AST;
|
105 | visitNonNullAssert(ast: NonNullAssert, context: any): AST;
|
106 | visitConditional(ast: Conditional, context: any): AST;
|
107 | visitPipe(ast: BindingPipe, context: any): AST;
|
108 | visitKeyedRead(ast: KeyedRead, context: any): AST;
|
109 | visitKeyedWrite(ast: KeyedWrite, context: any): AST;
|
110 | visitCall(ast: Call, context: any): AST;
|
111 | visitSafeCall(ast: SafeCall, context: any): AST;
|
112 | visitAll(asts: any[]): any[];
|
113 | visitChain(ast: Chain, context: any): AST;
|
114 | visitSafeKeyedRead(ast: SafeKeyedRead, context: any): AST;
|
115 | }
|
116 |
|
117 | export declare interface AstVisitor {
|
118 | |
119 |
|
120 |
|
121 |
|
122 | visitUnary?(ast: Unary, context: any): any;
|
123 | visitBinary(ast: Binary, context: any): any;
|
124 | visitChain(ast: Chain, context: any): any;
|
125 | visitConditional(ast: Conditional, context: any): any;
|
126 | |
127 |
|
128 |
|
129 |
|
130 | visitThisReceiver?(ast: ThisReceiver, context: any): any;
|
131 | visitImplicitReceiver(ast: ImplicitReceiver, context: any): any;
|
132 | visitInterpolation(ast: Interpolation, context: any): any;
|
133 | visitKeyedRead(ast: KeyedRead, context: any): any;
|
134 | visitKeyedWrite(ast: KeyedWrite, context: any): any;
|
135 | visitLiteralArray(ast: LiteralArray, context: any): any;
|
136 | visitLiteralMap(ast: LiteralMap, context: any): any;
|
137 | visitLiteralPrimitive(ast: LiteralPrimitive, context: any): any;
|
138 | visitPipe(ast: BindingPipe, context: any): any;
|
139 | visitPrefixNot(ast: PrefixNot, context: any): any;
|
140 | visitTypeofExpresion(ast: TypeofExpression, context: any): any;
|
141 | visitNonNullAssert(ast: NonNullAssert, context: any): any;
|
142 | visitPropertyRead(ast: PropertyRead, context: any): any;
|
143 | visitPropertyWrite(ast: PropertyWrite, context: any): any;
|
144 | visitSafePropertyRead(ast: SafePropertyRead, context: any): any;
|
145 | visitSafeKeyedRead(ast: SafeKeyedRead, context: any): any;
|
146 | visitCall(ast: Call, context: any): any;
|
147 | visitSafeCall(ast: SafeCall, context: any): any;
|
148 | visitASTWithSource?(ast: ASTWithSource, context: any): any;
|
149 | |
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 | visit?(ast: AST, context?: any): any;
|
156 | }
|
157 |
|
158 | export declare abstract class ASTWithName extends AST {
|
159 | nameSpan: AbsoluteSourceSpan;
|
160 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, nameSpan: AbsoluteSourceSpan);
|
161 | }
|
162 |
|
163 | export declare class ASTWithSource<T extends AST = AST> extends AST {
|
164 | ast: T;
|
165 | source: string | null;
|
166 | location: string;
|
167 | errors: ParserError[];
|
168 | constructor(ast: T, source: string | null, location: string, absoluteOffset: number, errors: ParserError[]);
|
169 | visit(visitor: AstVisitor, context?: any): any;
|
170 | toString(): string;
|
171 | }
|
172 |
|
173 | export declare class Attribute extends NodeWithI18n {
|
174 | name: string;
|
175 | value: string;
|
176 | readonly keySpan: ParseSourceSpan | undefined;
|
177 | valueSpan: ParseSourceSpan | undefined;
|
178 | valueTokens: InterpolatedAttributeToken[] | undefined;
|
179 | constructor(name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan | undefined, valueSpan: ParseSourceSpan | undefined, valueTokens: InterpolatedAttributeToken[] | undefined, i18n: I18nMeta_2 | undefined);
|
180 | visit(visitor: Visitor, context: any): any;
|
181 | }
|
182 |
|
183 | /**
|
184 | * A set of marker values to be used in the attributes arrays. These markers indicate that some
|
185 | * items are not regular attributes and the processing should be adapted accordingly.
|
186 | */
|
187 | declare const enum AttributeMarker {
|
188 | |
189 |
|
190 |
|
191 |
|
192 |
|
193 | NamespaceURI = 0,
|
194 | |
195 |
|
196 |
|
197 |
|
198 |
|
199 |
|
200 |
|
201 |
|
202 |
|
203 |
|
204 |
|
205 |
|
206 |
|
207 |
|
208 |
|
209 |
|
210 | Classes = 1,
|
211 | |
212 |
|
213 |
|
214 |
|
215 |
|
216 |
|
217 |
|
218 |
|
219 |
|
220 |
|
221 |
|
222 |
|
223 |
|
224 |
|
225 |
|
226 |
|
227 |
|
228 | Styles = 2,
|
229 | |
230 |
|
231 |
|
232 |
|
233 |
|
234 |
|
235 |
|
236 |
|
237 |
|
238 |
|
239 |
|
240 |
|
241 |
|
242 |
|
243 |
|
244 | Bindings = 3,
|
245 | |
246 |
|
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 |
|
255 |
|
256 |
|
257 |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 |
|
265 |
|
266 |
|
267 |
|
268 | Template = 4,
|
269 | |
270 |
|
271 |
|
272 |
|
273 |
|
274 |
|
275 |
|
276 |
|
277 |
|
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 | ProjectAs = 5,
|
285 | |
286 |
|
287 |
|
288 |
|
289 |
|
290 |
|
291 |
|
292 |
|
293 |
|
294 |
|
295 |
|
296 |
|
297 |
|
298 |
|
299 | I18n = 6
|
300 | }
|
301 |
|
302 | declare interface AttributeValueInterpolationToken extends TokenBase {
|
303 | type: LexerTokenType.ATTR_VALUE_INTERPOLATION;
|
304 | parts: [startMarker: string, expression: string, endMarker: string] | [startMarker: string, expression: string];
|
305 | }
|
306 |
|
307 | declare interface AttributeValueTextToken extends TokenBase {
|
308 | type: LexerTokenType.ATTR_VALUE_TEXT;
|
309 | parts: [value: string];
|
310 | }
|
311 |
|
312 | declare interface BaseNode {
|
313 | sourceSpan: ParseSourceSpan;
|
314 | visit(visitor: Visitor, context: any): any;
|
315 | }
|
316 |
|
317 | export declare class Binary extends AST {
|
318 | operation: string;
|
319 | left: AST;
|
320 | right: AST;
|
321 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, operation: string, left: AST, right: AST);
|
322 | visit(visitor: AstVisitor, context?: any): any;
|
323 | }
|
324 |
|
325 | export declare enum BinaryOperator {
|
326 | Equals = 0,
|
327 | NotEquals = 1,
|
328 | Identical = 2,
|
329 | NotIdentical = 3,
|
330 | Minus = 4,
|
331 | Plus = 5,
|
332 | Divide = 6,
|
333 | Multiply = 7,
|
334 | Modulo = 8,
|
335 | And = 9,
|
336 | Or = 10,
|
337 | BitwiseOr = 11,
|
338 | BitwiseAnd = 12,
|
339 | Lower = 13,
|
340 | LowerEquals = 14,
|
341 | Bigger = 15,
|
342 | BiggerEquals = 16,
|
343 | NullishCoalesce = 17
|
344 | }
|
345 |
|
346 | export declare class BinaryOperatorExpr extends Expression {
|
347 | operator: BinaryOperator;
|
348 | rhs: Expression;
|
349 | parens: boolean;
|
350 | lhs: Expression;
|
351 | constructor(operator: BinaryOperator, lhs: Expression, rhs: Expression, type?: Type | null, sourceSpan?: ParseSourceSpan | null, parens?: boolean);
|
352 | isEquivalent(e: Expression): boolean;
|
353 | isConstant(): boolean;
|
354 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
355 | clone(): BinaryOperatorExpr;
|
356 | }
|
357 |
|
358 | /**
|
359 | * Parses bindings in templates and in the directive host area.
|
360 | */
|
361 | declare class BindingParser {
|
362 | private _exprParser;
|
363 | private _interpolationConfig;
|
364 | private _schemaRegistry;
|
365 | errors: ParseError[];
|
366 | constructor(_exprParser: Parser, _interpolationConfig: InterpolationConfig, _schemaRegistry: ElementSchemaRegistry, errors: ParseError[]);
|
367 | get interpolationConfig(): InterpolationConfig;
|
368 | createBoundHostProperties(properties: HostProperties, sourceSpan: ParseSourceSpan): ParsedProperty[] | null;
|
369 | createDirectiveHostEventAsts(hostListeners: HostListeners, sourceSpan: ParseSourceSpan): ParsedEvent[] | null;
|
370 | parseInterpolation(value: string, sourceSpan: ParseSourceSpan, interpolatedTokens: InterpolatedAttributeToken[] | InterpolatedTextToken[] | null): ASTWithSource;
|
371 | /**
|
372 | * Similar to `parseInterpolation`, but treats the provided string as a single expression
|
373 | * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).
|
374 | * This is used for parsing the switch expression in ICUs.
|
375 | */
|
376 | parseInterpolationExpression(expression: string, sourceSpan: ParseSourceSpan): ASTWithSource;
|
377 | /**
|
378 | * Parses the bindings in a microsyntax expression, and converts them to
|
379 | * `ParsedProperty` or `ParsedVariable`.
|
380 | *
|
381 | * @param tplKey template binding name
|
382 | * @param tplValue template binding value
|
383 | * @param sourceSpan span of template binding relative to entire the template
|
384 | * @param absoluteValueOffset start of the tplValue relative to the entire template
|
385 | * @param targetMatchableAttrs potential attributes to match in the template
|
386 | * @param targetProps target property bindings in the template
|
387 | * @param targetVars target variables in the template
|
388 | */
|
389 | parseInlineTemplateBinding(tplKey: string, tplValue: string, sourceSpan: ParseSourceSpan, absoluteValueOffset: number, targetMatchableAttrs: string[][], targetProps: ParsedProperty[], targetVars: ParsedVariable[], isIvyAst: boolean): void;
|
390 | /**
|
391 | * Parses the bindings in a microsyntax expression, e.g.
|
392 | * ```
|
393 | * <tag *tplKey="let value1 = prop; let value2 = localVar">
|
394 | * ```
|
395 | *
|
396 | * @param tplKey template binding name
|
397 | * @param tplValue template binding value
|
398 | * @param sourceSpan span of template binding relative to entire the template
|
399 | * @param absoluteKeyOffset start of the `tplKey`
|
400 | * @param absoluteValueOffset start of the `tplValue`
|
401 | */
|
402 | private _parseTemplateBindings;
|
403 | parseLiteralAttr(name: string, value: string | null, sourceSpan: ParseSourceSpan, absoluteOffset: number, valueSpan: ParseSourceSpan | undefined, targetMatchableAttrs: string[][], targetProps: ParsedProperty[], keySpan: ParseSourceSpan): void;
|
404 | parsePropertyBinding(name: string, expression: string, isHost: boolean, isPartOfAssignmentBinding: boolean, sourceSpan: ParseSourceSpan, absoluteOffset: number, valueSpan: ParseSourceSpan | undefined, targetMatchableAttrs: string[][], targetProps: ParsedProperty[], keySpan: ParseSourceSpan): void;
|
405 | parsePropertyInterpolation(name: string, value: string, sourceSpan: ParseSourceSpan, valueSpan: ParseSourceSpan | undefined, targetMatchableAttrs: string[][], targetProps: ParsedProperty[], keySpan: ParseSourceSpan, interpolatedTokens: InterpolatedAttributeToken[] | InterpolatedTextToken[] | null): boolean;
|
406 | private _parsePropertyAst;
|
407 | private _parseAnimation;
|
408 | parseBinding(value: string, isHostBinding: boolean, sourceSpan: ParseSourceSpan, absoluteOffset: number): ASTWithSource;
|
409 | createBoundElementProperty(elementSelector: string, boundProp: ParsedProperty, skipValidation?: boolean, mapPropertyName?: boolean): BoundElementProperty;
|
410 | parseEvent(name: string, expression: string, isAssignmentEvent: boolean, sourceSpan: ParseSourceSpan, handlerSpan: ParseSourceSpan, targetMatchableAttrs: string[][], targetEvents: ParsedEvent[], keySpan: ParseSourceSpan): void;
|
411 | calcPossibleSecurityContexts(selector: string, propName: string, isAttribute: boolean): SecurityContext[];
|
412 | private _parseAnimationEvent;
|
413 | private _parseRegularEvent;
|
414 | private _parseAction;
|
415 | private _reportError;
|
416 | private _reportExpressionParserErrors;
|
417 | /**
|
418 | * @param propName the name of the property / attribute
|
419 | * @param sourceSpan
|
420 | * @param isAttr true when binding to an attribute
|
421 | */
|
422 | private _validatePropertyOrAttributeName;
|
423 | /**
|
424 | * Returns whether a parsed AST is allowed to be used within the event side of a two-way binding.
|
425 | * @param ast Parsed AST to be checked.
|
426 | */
|
427 | private _isAllowedAssignmentEvent;
|
428 | }
|
429 |
|
430 | export declare class BindingPipe extends ASTWithName {
|
431 | exp: AST;
|
432 | name: string;
|
433 | args: any[];
|
434 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, exp: AST, name: string, args: any[], nameSpan: AbsoluteSourceSpan);
|
435 | visit(visitor: AstVisitor, context?: any): any;
|
436 | }
|
437 |
|
438 | export declare enum BindingType {
|
439 | Property = 0,
|
440 | Attribute = 1,
|
441 | Class = 2,
|
442 | Style = 3,
|
443 | Animation = 4,
|
444 | TwoWay = 5
|
445 | }
|
446 |
|
447 | export declare class Block extends NodeWithI18n {
|
448 | name: string;
|
449 | parameters: BlockParameter[];
|
450 | children: Node_2[];
|
451 | nameSpan: ParseSourceSpan;
|
452 | startSourceSpan: ParseSourceSpan;
|
453 | endSourceSpan: ParseSourceSpan | null;
|
454 | constructor(name: string, parameters: BlockParameter[], children: Node_2[], sourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan?: ParseSourceSpan | null, i18n?: I18nMeta_2);
|
455 | visit(visitor: Visitor, context: any): any;
|
456 | }
|
457 |
|
458 | export declare class BlockParameter implements BaseNode {
|
459 | expression: string;
|
460 | sourceSpan: ParseSourceSpan;
|
461 | constructor(expression: string, sourceSpan: ParseSourceSpan);
|
462 | visit(visitor: Visitor, context: any): any;
|
463 | }
|
464 |
|
465 | declare class BlockPlaceholder implements Node_3 {
|
466 | name: string;
|
467 | parameters: string[];
|
468 | startName: string;
|
469 | closeName: string;
|
470 | children: Node_3[];
|
471 | sourceSpan: ParseSourceSpan;
|
472 | startSourceSpan: ParseSourceSpan | null;
|
473 | endSourceSpan: ParseSourceSpan | null;
|
474 | constructor(name: string, parameters: string[], startName: string, closeName: string, children: Node_3[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan | null, endSourceSpan: ParseSourceSpan | null);
|
475 | visit(visitor: Visitor_2, context?: any): any;
|
476 | }
|
477 |
|
478 | declare const BOOL_TYPE: BuiltinType;
|
479 |
|
480 | export declare class BoundElementProperty {
|
481 | name: string;
|
482 | type: BindingType;
|
483 | securityContext: SecurityContext;
|
484 | value: ASTWithSource;
|
485 | unit: string | null;
|
486 | sourceSpan: ParseSourceSpan;
|
487 | readonly keySpan: ParseSourceSpan | undefined;
|
488 | valueSpan: ParseSourceSpan | undefined;
|
489 | constructor(name: string, type: BindingType, securityContext: SecurityContext, value: ASTWithSource, unit: string | null, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan | undefined, valueSpan: ParseSourceSpan | undefined);
|
490 | }
|
491 |
|
492 | /**
|
493 | * Result of performing the binding operation against a `Target`.
|
494 | *
|
495 | * The original `Target` is accessible, as well as a suite of methods for extracting binding
|
496 | * information regarding the `Target`.
|
497 | *
|
498 | * @param DirectiveT directive metadata type
|
499 | */
|
500 | export declare interface BoundTarget<DirectiveT extends DirectiveMeta> {
|
501 | |
502 |
|
503 |
|
504 | readonly target: Target;
|
505 | |
506 |
|
507 |
|
508 |
|
509 | getDirectivesOfNode(node: TmplAstElement | TmplAstTemplate): DirectiveT[] | null;
|
510 | |
511 |
|
512 |
|
513 |
|
514 | getReferenceTarget(ref: TmplAstReference): ReferenceTarget<DirectiveT> | null;
|
515 | |
516 |
|
517 |
|
518 |
|
519 |
|
520 | getConsumerOfBinding(binding: TmplAstBoundAttribute | TmplAstBoundEvent | TmplAstTextAttribute): DirectiveT | TmplAstElement | TmplAstTemplate | null;
|
521 | |
522 |
|
523 |
|
524 |
|
525 |
|
526 |
|
527 |
|
528 |
|
529 |
|
530 | getExpressionTarget(expr: AST): TemplateEntity | null;
|
531 | |
532 |
|
533 |
|
534 |
|
535 |
|
536 |
|
537 | getDefinitionNodeOfSymbol(symbol: TemplateEntity): ScopedNode | null;
|
538 | |
539 |
|
540 |
|
541 |
|
542 |
|
543 |
|
544 | getNestingLevel(node: ScopedNode): number;
|
545 | |
546 |
|
547 |
|
548 |
|
549 | getEntitiesInScope(node: ScopedNode | null): ReadonlySet<TemplateEntity>;
|
550 | |
551 |
|
552 |
|
553 |
|
554 | getUsedDirectives(): DirectiveT[];
|
555 | |
556 |
|
557 |
|
558 |
|
559 | getEagerlyUsedDirectives(): DirectiveT[];
|
560 | |
561 |
|
562 |
|
563 |
|
564 | getUsedPipes(): string[];
|
565 | |
566 |
|
567 |
|
568 |
|
569 | getEagerlyUsedPipes(): string[];
|
570 | |
571 |
|
572 |
|
573 | getDeferBlocks(): TmplAstDeferredBlock[];
|
574 | |
575 |
|
576 |
|
577 |
|
578 |
|
579 | getDeferredTriggerTarget(block: TmplAstDeferredBlock, trigger: TmplAstDeferredTrigger): TmplAstElement | null;
|
580 | |
581 |
|
582 |
|
583 | isDeferred(node: TmplAstElement): boolean;
|
584 | }
|
585 |
|
586 | export declare class BuiltinType extends Type {
|
587 | name: BuiltinTypeName;
|
588 | constructor(name: BuiltinTypeName, modifiers?: TypeModifier);
|
589 | visitType(visitor: TypeVisitor, context: any): any;
|
590 | }
|
591 |
|
592 | export declare enum BuiltinTypeName {
|
593 | Dynamic = 0,
|
594 | Bool = 1,
|
595 | String = 2,
|
596 | Int = 3,
|
597 | Number = 4,
|
598 | Function = 5,
|
599 | Inferred = 6,
|
600 | None = 7
|
601 | }
|
602 |
|
603 | export declare class Call extends AST {
|
604 | receiver: AST;
|
605 | args: AST[];
|
606 | argumentSpan: AbsoluteSourceSpan;
|
607 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, receiver: AST, args: AST[], argumentSpan: AbsoluteSourceSpan);
|
608 | visit(visitor: AstVisitor, context?: any): any;
|
609 | }
|
610 |
|
611 | /**
|
612 | * Multiple expressions separated by a semicolon.
|
613 | */
|
614 | export declare class Chain extends AST {
|
615 | expressions: any[];
|
616 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expressions: any[]);
|
617 | visit(visitor: AstVisitor, context?: any): any;
|
618 | }
|
619 |
|
620 | export declare enum ChangeDetectionStrategy {
|
621 | OnPush = 0,
|
622 | Default = 1
|
623 | }
|
624 |
|
625 | declare class CloneVisitor implements Visitor_2 {
|
626 | visitText(text: Text_3, context?: any): Text_3;
|
627 | visitContainer(container: Container, context?: any): Container;
|
628 | visitIcu(icu: Icu, context?: any): Icu;
|
629 | visitTagPlaceholder(ph: TagPlaceholder, context?: any): TagPlaceholder;
|
630 | visitPlaceholder(ph: Placeholder, context?: any): Placeholder;
|
631 | visitIcuPlaceholder(ph: IcuPlaceholder, context?: any): IcuPlaceholder;
|
632 | visitBlockPlaceholder(ph: BlockPlaceholder, context?: any): BlockPlaceholder;
|
633 | }
|
634 |
|
635 | export declare class CommaExpr extends Expression {
|
636 | parts: Expression[];
|
637 | constructor(parts: Expression[], sourceSpan?: ParseSourceSpan | null);
|
638 | isEquivalent(e: Expression): boolean;
|
639 | isConstant(): boolean;
|
640 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
641 | clone(): CommaExpr;
|
642 | }
|
643 |
|
644 | declare class Comment_2 implements BaseNode {
|
645 | value: string | null;
|
646 | sourceSpan: ParseSourceSpan;
|
647 | constructor(value: string | null, sourceSpan: ParseSourceSpan);
|
648 | visit(visitor: Visitor, context: any): any;
|
649 | }
|
650 | export { Comment_2 as Comment }
|
651 |
|
652 |
|
653 |
|
654 |
|
655 |
|
656 |
|
657 |
|
658 | declare class Comment_3 implements TmplAstNode {
|
659 | value: string;
|
660 | sourceSpan: ParseSourceSpan;
|
661 | constructor(value: string, sourceSpan: ParseSourceSpan);
|
662 | visit<Result>(_visitor: TmplAstVisitor<Result>): Result;
|
663 | }
|
664 |
|
665 | /**
|
666 | * Generate an ngDevMode guarded call to setClassDebugInfo with the debug info about the class
|
667 | * (e.g., the file name in which the class is defined)
|
668 | */
|
669 | export declare function compileClassDebugInfo(debugInfo: R3ClassDebugInfo): outputAst.Expression;
|
670 |
|
671 | export declare function compileClassMetadata(metadata: R3ClassMetadata): outputAst.InvokeFunctionExpr;
|
672 |
|
673 | export declare type CompileClassMetadataFn = (metadata: R3ClassMetadata) => outputAst.Expression;
|
674 |
|
675 | /**
|
676 | * Wraps the `setClassMetadata` function with extra logic that dynamically
|
677 | * loads dependencies from `@defer` blocks.
|
678 | *
|
679 | * Generates a call like this:
|
680 | * ```ts
|
681 | * setClassMetadataAsync(type, () => [
|
682 | * import('./cmp-a').then(m => m.CmpA);
|
683 | * import('./cmp-b').then(m => m.CmpB);
|
684 | * ], (CmpA, CmpB) => {
|
685 | * setClassMetadata(type, decorators, ctorParameters, propParameters);
|
686 | * });
|
687 | * ```
|
688 | *
|
689 | * Similar to the `setClassMetadata` call, it's wrapped into the `ngDevMode`
|
690 | * check to tree-shake away this code in production mode.
|
691 | */
|
692 | export declare function compileComponentClassMetadata(metadata: R3ClassMetadata, dependencies: R3DeferPerComponentDependency[] | null): outputAst.Expression;
|
693 |
|
694 | export declare function compileComponentDeclareClassMetadata(metadata: R3ClassMetadata, dependencies: R3DeferPerComponentDependency[] | null): outputAst.Expression;
|
695 |
|
696 | /**
|
697 | * Compile a component for the render3 runtime as defined by the `R3ComponentMetadata`.
|
698 | */
|
699 | export declare function compileComponentFromMetadata(meta: R3ComponentMetadata<R3TemplateDependency>, constantPool: ConstantPool, bindingParser: BindingParser): R3CompiledExpression;
|
700 |
|
701 | export declare function compileDeclareClassMetadata(metadata: R3ClassMetadata): outputAst.Expression;
|
702 |
|
703 | /**
|
704 | * Compile a component declaration defined by the `R3ComponentMetadata`.
|
705 | */
|
706 | export declare function compileDeclareComponentFromMetadata(meta: R3ComponentMetadata<R3TemplateDependencyMetadata>, template: ParsedTemplate, additionalTemplateInfo: DeclareComponentTemplateInfo): R3CompiledExpression;
|
707 |
|
708 | /**
|
709 | * Compile a directive declaration defined by the `R3DirectiveMetadata`.
|
710 | */
|
711 | export declare function compileDeclareDirectiveFromMetadata(meta: R3DirectiveMetadata): R3CompiledExpression;
|
712 |
|
713 | export declare function compileDeclareFactoryFunction(meta: R3FactoryMetadata): R3CompiledExpression;
|
714 |
|
715 | /**
|
716 | * Compile a Injectable declaration defined by the `R3InjectableMetadata`.
|
717 | */
|
718 | export declare function compileDeclareInjectableFromMetadata(meta: R3InjectableMetadata): R3CompiledExpression;
|
719 |
|
720 | export declare function compileDeclareInjectorFromMetadata(meta: R3InjectorMetadata): R3CompiledExpression;
|
721 |
|
722 | export declare function compileDeclareNgModuleFromMetadata(meta: R3NgModuleMetadata): R3CompiledExpression;
|
723 |
|
724 | /**
|
725 | * Compile a Pipe declaration defined by the `R3PipeMetadata`.
|
726 | */
|
727 | export declare function compileDeclarePipeFromMetadata(meta: R3PipeMetadata): R3CompiledExpression;
|
728 |
|
729 | /**
|
730 | * Compiles the dependency resolver function for a defer block.
|
731 | */
|
732 | export declare function compileDeferResolverFunction(meta: R3DeferResolverFunctionMetadata): outputAst.ArrowFunctionExpr;
|
733 |
|
734 | /**
|
735 | * Compile a directive for the render3 runtime as defined by the `R3DirectiveMetadata`.
|
736 | */
|
737 | export declare function compileDirectiveFromMetadata(meta: R3DirectiveMetadata, constantPool: ConstantPool, bindingParser: BindingParser): R3CompiledExpression;
|
738 |
|
739 | /**
|
740 | * Construct a factory function expression for the given `R3FactoryMetadata`.
|
741 | */
|
742 | export declare function compileFactoryFunction(meta: R3FactoryMetadata): R3CompiledExpression;
|
743 |
|
744 | /**
|
745 | * Compiles the expression that initializes HMR for a class.
|
746 | * @param meta HMR metadata extracted from the class.
|
747 | */
|
748 | export declare function compileHmrInitializer(meta: R3HmrMetadata): outputAst.Expression;
|
749 |
|
750 | /**
|
751 | * Compiles the HMR update callback for a class.
|
752 | * @param definitions Compiled definitions for the class (e.g. `defineComponent` calls).
|
753 | * @param constantStatements Supporting constants statements that were generated alongside
|
754 | * the definition.
|
755 | * @param meta HMR metadata extracted from the class.
|
756 | */
|
757 | export declare function compileHmrUpdateCallback(definitions: {
|
758 | name: string;
|
759 | initializer: outputAst.Expression | null;
|
760 | statements: outputAst.Statement[];
|
761 | }[], constantStatements: outputAst.Statement[], meta: R3HmrMetadata): outputAst.DeclareFunctionStmt;
|
762 |
|
763 | export declare interface CompileIdentifierMetadata {
|
764 | reference: any;
|
765 | }
|
766 |
|
767 | export declare function compileInjectable(meta: R3InjectableMetadata, resolveForwardRefs: boolean): R3CompiledExpression;
|
768 |
|
769 | export declare function compileInjector(meta: R3InjectorMetadata): R3CompiledExpression;
|
770 |
|
771 |
|
772 |
|
773 |
|
774 | export declare function compileNgModule(meta: R3NgModuleMetadata): R3CompiledExpression;
|
775 |
|
776 |
|
777 |
|
778 |
|
779 |
|
780 |
|
781 |
|
782 |
|
783 |
|
784 | export declare function compileOpaqueAsyncClassMetadata(metadata: R3ClassMetadata, deferResolver: outputAst.Expression, deferredDependencyNames: string[]): outputAst.Expression;
|
785 |
|
786 | export declare function compilePipeFromMetadata(metadata: R3PipeMetadata): R3CompiledExpression;
|
787 |
|
788 | export declare class CompilerConfig {
|
789 | defaultEncapsulation: ViewEncapsulation | null;
|
790 | preserveWhitespaces: boolean;
|
791 | strictInjectionParameters: boolean;
|
792 | constructor({ defaultEncapsulation, preserveWhitespaces, strictInjectionParameters, }?: {
|
793 | defaultEncapsulation?: ViewEncapsulation;
|
794 | preserveWhitespaces?: boolean;
|
795 | strictInjectionParameters?: boolean;
|
796 | });
|
797 | }
|
798 |
|
799 | export declare function computeMsgId(msg: string, meaning?: string): string;
|
800 |
|
801 | export declare class Conditional extends AST {
|
802 | condition: AST;
|
803 | trueExp: AST;
|
804 | falseExp: AST;
|
805 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, condition: AST, trueExp: AST, falseExp: AST);
|
806 | visit(visitor: AstVisitor, context?: any): any;
|
807 | }
|
808 |
|
809 | export declare class ConditionalExpr extends Expression {
|
810 | condition: Expression;
|
811 | falseCase: Expression | null;
|
812 | trueCase: Expression;
|
813 | constructor(condition: Expression, trueCase: Expression, falseCase?: Expression | null, type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
814 | isEquivalent(e: Expression): boolean;
|
815 | isConstant(): boolean;
|
816 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
817 | clone(): ConditionalExpr;
|
818 | }
|
819 |
|
820 | declare interface Console_2 {
|
821 | log(message: string): void;
|
822 | warn(message: string): void;
|
823 | }
|
824 |
|
825 |
|
826 |
|
827 |
|
828 |
|
829 |
|
830 | export declare class ConstantPool {
|
831 | private readonly isClosureCompilerEnabled;
|
832 | statements: outputAst.Statement[];
|
833 | private literals;
|
834 | private literalFactories;
|
835 | private sharedConstants;
|
836 | |
837 |
|
838 |
|
839 |
|
840 |
|
841 |
|
842 | private _claimedNames;
|
843 | private nextNameIndex;
|
844 | constructor(isClosureCompilerEnabled?: boolean);
|
845 | getConstLiteral(literal: outputAst.Expression, forceShared?: boolean): outputAst.Expression;
|
846 | getSharedConstant(def: SharedConstantDefinition, expr: outputAst.Expression): outputAst.Expression;
|
847 | getLiteralFactory(literal: outputAst.LiteralArrayExpr | outputAst.LiteralMapExpr): {
|
848 | literalFactory: outputAst.Expression;
|
849 | literalFactoryArguments: outputAst.Expression[];
|
850 | };
|
851 | getSharedFunctionReference(fn: outputAst.Expression, prefix: string, useUniqueName?: boolean): outputAst.Expression;
|
852 | private _getLiteralFactory;
|
853 | |
854 |
|
855 |
|
856 |
|
857 |
|
858 |
|
859 |
|
860 | uniqueName(name: string, alwaysIncludeSuffix?: boolean): string;
|
861 | private freshName;
|
862 | }
|
863 |
|
864 | declare class Container implements Node_3 {
|
865 | children: Node_3[];
|
866 | sourceSpan: ParseSourceSpan;
|
867 | constructor(children: Node_3[], sourceSpan: ParseSourceSpan);
|
868 | visit(visitor: Visitor_2, context?: any): any;
|
869 | }
|
870 |
|
871 | /**
|
872 | * A structure to hold the cooked and raw strings of a template literal element, along with its
|
873 | * source-span range.
|
874 | */
|
875 | declare interface CookedRawString {
|
876 | cooked: string;
|
877 | raw: string;
|
878 | range: ParseSourceSpan | null;
|
879 | }
|
880 |
|
881 | declare namespace core {
|
882 | export {
|
883 | parseSelectorToR3Selector,
|
884 | emitDistinctChangesOnlyDefaultValue,
|
885 | ViewEncapsulation,
|
886 | ChangeDetectionStrategy,
|
887 | Input,
|
888 | InputFlags,
|
889 | Output,
|
890 | HostBinding,
|
891 | HostListener,
|
892 | SchemaMetadata,
|
893 | CUSTOM_ELEMENTS_SCHEMA,
|
894 | NO_ERRORS_SCHEMA,
|
895 | Type_2 as Type,
|
896 | SecurityContext,
|
897 | InjectFlags,
|
898 | MissingTranslationStrategy,
|
899 | SelectorFlags,
|
900 | R3CssSelector,
|
901 | R3CssSelectorList,
|
902 | RenderFlags,
|
903 | AttributeMarker
|
904 | }
|
905 | }
|
906 | export { core }
|
907 |
|
908 |
|
909 |
|
910 |
|
911 | export declare function createCssSelectorFromNode(node: t.Element | t.Template): CssSelector;
|
912 |
|
913 | export declare function createInjectableType(meta: R3InjectableMetadata): outputAst.ExpressionType;
|
914 |
|
915 | export declare function createMayBeForwardRefExpression<T extends outputAst.Expression>(expression: T, forwardRef: ForwardRefHandling): MaybeForwardRefExpression<T>;
|
916 |
|
917 |
|
918 |
|
919 |
|
920 |
|
921 |
|
922 |
|
923 | export declare class CssSelector {
|
924 | element: string | null;
|
925 | classNames: string[];
|
926 | |
927 |
|
928 |
|
929 |
|
930 |
|
931 |
|
932 |
|
933 |
|
934 |
|
935 |
|
936 |
|
937 | attrs: string[];
|
938 | notSelectors: CssSelector[];
|
939 | static parse(selector: string): CssSelector[];
|
940 | |
941 |
|
942 |
|
943 |
|
944 |
|
945 |
|
946 |
|
947 |
|
948 |
|
949 |
|
950 | unescapeAttribute(attr: string): string;
|
951 | |
952 |
|
953 |
|
954 |
|
955 |
|
956 |
|
957 |
|
958 |
|
959 |
|
960 |
|
961 | escapeAttribute(attr: string): string;
|
962 | isElementSelector(): boolean;
|
963 | hasElementSelector(): boolean;
|
964 | setElement(element?: string | null): void;
|
965 | getAttrs(): string[];
|
966 | addAttribute(name: string, value?: string): void;
|
967 | addClassName(name: string): void;
|
968 | toString(): string;
|
969 | }
|
970 |
|
971 | export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
|
972 |
|
973 |
|
974 |
|
975 |
|
976 | export declare const enum DeclarationListEmitMode {
|
977 | |
978 |
|
979 |
|
980 |
|
981 |
|
982 |
|
983 |
|
984 | Direct = 0,
|
985 | |
986 |
|
987 |
|
988 |
|
989 |
|
990 |
|
991 |
|
992 |
|
993 | Closure = 1,
|
994 | |
995 |
|
996 |
|
997 |
|
998 |
|
999 |
|
1000 |
|
1001 |
|
1002 |
|
1003 |
|
1004 |
|
1005 |
|
1006 |
|
1007 |
|
1008 |
|
1009 |
|
1010 |
|
1011 |
|
1012 | ClosureResolved = 2,
|
1013 | RuntimeResolved = 3
|
1014 | }
|
1015 |
|
1016 | export declare interface DeclareComponentTemplateInfo {
|
1017 | |
1018 |
|
1019 |
|
1020 |
|
1021 |
|
1022 |
|
1023 | content: string;
|
1024 | |
1025 |
|
1026 |
|
1027 |
|
1028 |
|
1029 |
|
1030 | sourceUrl: string;
|
1031 | |
1032 |
|
1033 |
|
1034 | isInline: boolean;
|
1035 | |
1036 |
|
1037 |
|
1038 |
|
1039 | inlineTemplateLiteralExpression: outputAst.Expression | null;
|
1040 | }
|
1041 |
|
1042 | export declare class DeclareFunctionStmt extends Statement {
|
1043 | name: string;
|
1044 | params: FnParam[];
|
1045 | statements: Statement[];
|
1046 | type: Type | null;
|
1047 | constructor(name: string, params: FnParam[], statements: Statement[], type?: Type | null, modifiers?: StmtModifier, sourceSpan?: ParseSourceSpan | null, leadingComments?: LeadingComment[]);
|
1048 | isEquivalent(stmt: Statement): boolean;
|
1049 | visitStatement(visitor: StatementVisitor, context: any): any;
|
1050 | }
|
1051 |
|
1052 | export declare class DeclareVarStmt extends Statement {
|
1053 | name: string;
|
1054 | value?: Expression | undefined;
|
1055 | type: Type | null;
|
1056 | constructor(name: string, value?: Expression | undefined, type?: Type | null, modifiers?: StmtModifier, sourceSpan?: ParseSourceSpan | null, leadingComments?: LeadingComment[]);
|
1057 | isEquivalent(stmt: Statement): boolean;
|
1058 | visitStatement(visitor: StatementVisitor, context: any): any;
|
1059 | }
|
1060 |
|
1061 | export declare const DEFAULT_INTERPOLATION_CONFIG: InterpolationConfig;
|
1062 |
|
1063 | /**
|
1064 | * Defines how dynamic imports for deferred dependencies should be emitted in the
|
1065 | * generated output:
|
1066 | * - either in a function on per-component basis (in case of local compilation)
|
1067 | * - or in a function on per-block basis (in full compilation mode)
|
1068 | */
|
1069 | export declare const enum DeferBlockDepsEmitMode {
|
1070 | |
1071 |
|
1072 |
|
1073 |
|
1074 |
|
1075 |
|
1076 | PerBlock = 0,
|
1077 | |
1078 |
|
1079 |
|
1080 |
|
1081 |
|
1082 |
|
1083 |
|
1084 | PerComponent = 1
|
1085 | }
|
1086 |
|
1087 | export declare function devOnlyGuardedExpression(expr: outputAst.Expression): outputAst.Expression;
|
1088 |
|
1089 |
|
1090 |
|
1091 |
|
1092 |
|
1093 | export declare interface DirectiveMeta {
|
1094 | |
1095 |
|
1096 |
|
1097 | name: string;
|
1098 |
|
1099 | selector: string | null;
|
1100 | |
1101 |
|
1102 |
|
1103 | isComponent: boolean;
|
1104 | |
1105 |
|
1106 |
|
1107 |
|
1108 |
|
1109 | inputs: InputOutputPropertySet;
|
1110 | |
1111 |
|
1112 |
|
1113 |
|
1114 |
|
1115 | outputs: InputOutputPropertySet;
|
1116 | |
1117 |
|
1118 |
|
1119 |
|
1120 |
|
1121 | exportAs: string[] | null;
|
1122 | |
1123 |
|
1124 |
|
1125 | isStructural: boolean;
|
1126 | |
1127 |
|
1128 |
|
1129 | ngContentSelectors: string[] | null;
|
1130 | |
1131 |
|
1132 |
|
1133 | preserveWhitespaces: boolean;
|
1134 | |
1135 |
|
1136 |
|
1137 |
|
1138 | animationTriggerNames: AnimationTriggerNames | null;
|
1139 | }
|
1140 |
|
1141 | export declare class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
1142 | private _schema;
|
1143 | private _eventSchema;
|
1144 | constructor();
|
1145 | hasProperty(tagName: string, propName: string, schemaMetas: SchemaMetadata[]): boolean;
|
1146 | hasElement(tagName: string, schemaMetas: SchemaMetadata[]): boolean;
|
1147 | /**
|
1148 | * securityContext returns the security context for the given property on the given DOM tag.
|
1149 | *
|
1150 | * Tag and property name are statically known and cannot change at runtime, i.e. it is not
|
1151 | * possible to bind a value into a changing attribute or tag name.
|
1152 | *
|
1153 | * The filtering is based on a list of allowed tags|attributes. All attributes in the schema
|
1154 | * above are assumed to have the 'NONE' security context, i.e. that they are safe inert
|
1155 | * string values. Only specific well known attack vectors are assigned their appropriate context.
|
1156 | */
|
1157 | securityContext(tagName: string, propName: string, isAttribute: boolean): SecurityContext;
|
1158 | getMappedPropName(propName: string): string;
|
1159 | getDefaultComponentElementName(): string;
|
1160 | validateProperty(name: string): {
|
1161 | error: boolean;
|
1162 | msg?: string;
|
1163 | };
|
1164 | validateAttribute(name: string): {
|
1165 | error: boolean;
|
1166 | msg?: string;
|
1167 | };
|
1168 | allKnownElementNames(): string[];
|
1169 | allKnownAttributesOfElement(tagName: string): string[];
|
1170 | allKnownEventsOfElement(tagName: string): string[];
|
1171 | normalizeAnimationStyleProperty(propName: string): string;
|
1172 | normalizeAnimationStyleValue(camelCaseProp: string, userProvidedProp: string, val: string | number): {
|
1173 | error: string;
|
1174 | value: string;
|
1175 | };
|
1176 | }
|
1177 |
|
1178 | export declare const DYNAMIC_TYPE: BuiltinType;
|
1179 |
|
1180 | export declare class DynamicImportExpr extends Expression {
|
1181 | url: string | Expression;
|
1182 | urlComment?: string | undefined;
|
1183 | constructor(url: string | Expression, sourceSpan?: ParseSourceSpan | null, urlComment?: string | undefined);
|
1184 | isEquivalent(e: Expression): boolean;
|
1185 | isConstant(): boolean;
|
1186 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
1187 | clone(): DynamicImportExpr;
|
1188 | }
|
1189 |
|
1190 | declare class Element_2 extends NodeWithI18n {
|
1191 | name: string;
|
1192 | attrs: Attribute[];
|
1193 | children: Node_2[];
|
1194 | startSourceSpan: ParseSourceSpan;
|
1195 | endSourceSpan: ParseSourceSpan | null;
|
1196 | constructor(name: string, attrs: Attribute[], children: Node_2[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan?: ParseSourceSpan | null, i18n?: I18nMeta_2);
|
1197 | visit(visitor: Visitor, context: any): any;
|
1198 | }
|
1199 | export { Element_2 as Element }
|
1200 |
|
1201 | export declare abstract class ElementSchemaRegistry {
|
1202 | abstract hasProperty(tagName: string, propName: string, schemaMetas: SchemaMetadata[]): boolean;
|
1203 | abstract hasElement(tagName: string, schemaMetas: SchemaMetadata[]): boolean;
|
1204 | abstract securityContext(elementName: string, propName: string, isAttribute: boolean): SecurityContext;
|
1205 | abstract allKnownElementNames(): string[];
|
1206 | abstract getMappedPropName(propName: string): string;
|
1207 | abstract getDefaultComponentElementName(): string;
|
1208 | abstract validateProperty(name: string): {
|
1209 | error: boolean;
|
1210 | msg?: string;
|
1211 | };
|
1212 | abstract validateAttribute(name: string): {
|
1213 | error: boolean;
|
1214 | msg?: string;
|
1215 | };
|
1216 | abstract normalizeAnimationStyleProperty(propName: string): string;
|
1217 | abstract normalizeAnimationStyleValue(camelCaseProp: string, userProvidedProp: string, val: string | number): {
|
1218 | error: string;
|
1219 | value: string;
|
1220 | };
|
1221 | }
|
1222 |
|
1223 |
|
1224 | export declare const emitDistinctChangesOnlyDefaultValue = true;
|
1225 |
|
1226 | export declare class EmitterVisitorContext {
|
1227 | private _indent;
|
1228 | static createRoot(): EmitterVisitorContext;
|
1229 | private _lines;
|
1230 | constructor(_indent: number);
|
1231 | println(from?: {
|
1232 | sourceSpan: ParseSourceSpan | null;
|
1233 | } | null, lastPart?: string): void;
|
1234 | lineIsEmpty(): boolean;
|
1235 | lineLength(): number;
|
1236 | print(from: {
|
1237 | sourceSpan: ParseSourceSpan | null;
|
1238 | } | null, part: string, newLine?: boolean): void;
|
1239 | removeEmptyLastLine(): void;
|
1240 | incIndent(): void;
|
1241 | decIndent(): void;
|
1242 | toSource(): string;
|
1243 | toSourceMapGenerator(genFilePath: string, startsAtLine?: number): SourceMapGenerator;
|
1244 | spanOf(line: number, column: number): ParseSourceSpan | null;
|
1245 | }
|
1246 |
|
1247 | export declare class EmptyExpr extends AST {
|
1248 | visit(visitor: AstVisitor, context?: any): void;
|
1249 | }
|
1250 |
|
1251 |
|
1252 |
|
1253 |
|
1254 |
|
1255 |
|
1256 |
|
1257 |
|
1258 |
|
1259 |
|
1260 | export declare function encapsulateStyle(style: string, componentIdentifier?: string): string;
|
1261 |
|
1262 | declare interface EncodedEntityToken extends TokenBase {
|
1263 | type: LexerTokenType.ENCODED_ENTITY;
|
1264 | parts: [decoded: string, encoded: string];
|
1265 | }
|
1266 |
|
1267 | export declare const EOF: Token;
|
1268 |
|
1269 | export declare class Expansion extends NodeWithI18n {
|
1270 | switchValue: string;
|
1271 | type: string;
|
1272 | cases: ExpansionCase[];
|
1273 | switchValueSourceSpan: ParseSourceSpan;
|
1274 | constructor(switchValue: string, type: string, cases: ExpansionCase[], sourceSpan: ParseSourceSpan, switchValueSourceSpan: ParseSourceSpan, i18n?: I18nMeta_2);
|
1275 | visit(visitor: Visitor, context: any): any;
|
1276 | }
|
1277 |
|
1278 | export declare class ExpansionCase implements BaseNode {
|
1279 | value: string;
|
1280 | expression: Node_2[];
|
1281 | sourceSpan: ParseSourceSpan;
|
1282 | valueSourceSpan: ParseSourceSpan;
|
1283 | expSourceSpan: ParseSourceSpan;
|
1284 | constructor(value: string, expression: Node_2[], sourceSpan: ParseSourceSpan, valueSourceSpan: ParseSourceSpan, expSourceSpan: ParseSourceSpan);
|
1285 | visit(visitor: Visitor, context: any): any;
|
1286 | }
|
1287 |
|
1288 | export declare abstract class Expression {
|
1289 | type: Type | null;
|
1290 | sourceSpan: ParseSourceSpan | null;
|
1291 | constructor(type: Type | null | undefined, sourceSpan?: ParseSourceSpan | null);
|
1292 | abstract visitExpression(visitor: ExpressionVisitor, context: any): any;
|
1293 | /**
|
1294 | * Calculates whether this expression produces the same value as the given expression.
|
1295 | * Note: We don't check Types nor ParseSourceSpans nor function arguments.
|
1296 | */
|
1297 | abstract isEquivalent(e: Expression): boolean;
|
1298 | /**
|
1299 | * Return true if the expression is constant.
|
1300 | */
|
1301 | abstract isConstant(): boolean;
|
1302 | abstract clone(): Expression;
|
1303 | prop(name: string, sourceSpan?: ParseSourceSpan | null): ReadPropExpr;
|
1304 | key(index: Expression, type?: Type | null, sourceSpan?: ParseSourceSpan | null): ReadKeyExpr;
|
1305 | callFn(params: Expression[], sourceSpan?: ParseSourceSpan | null, pure?: boolean): InvokeFunctionExpr;
|
1306 | instantiate(params: Expression[], type?: Type | null, sourceSpan?: ParseSourceSpan | null): InstantiateExpr;
|
1307 | conditional(trueCase: Expression, falseCase?: Expression | null, sourceSpan?: ParseSourceSpan | null): ConditionalExpr;
|
1308 | equals(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1309 | notEquals(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1310 | identical(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1311 | notIdentical(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1312 | minus(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1313 | plus(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1314 | divide(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1315 | multiply(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1316 | modulo(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1317 | and(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1318 | bitwiseOr(rhs: Expression, sourceSpan?: ParseSourceSpan | null, parens?: boolean): BinaryOperatorExpr;
|
1319 | bitwiseAnd(rhs: Expression, sourceSpan?: ParseSourceSpan | null, parens?: boolean): BinaryOperatorExpr;
|
1320 | or(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1321 | lower(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1322 | lowerEquals(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1323 | bigger(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1324 | biggerEquals(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1325 | isBlank(sourceSpan?: ParseSourceSpan | null): Expression;
|
1326 | nullishCoalesce(rhs: Expression, sourceSpan?: ParseSourceSpan | null): BinaryOperatorExpr;
|
1327 | toStmt(): Statement;
|
1328 | }
|
1329 |
|
1330 | export declare class ExpressionBinding {
|
1331 | readonly sourceSpan: AbsoluteSourceSpan;
|
1332 | readonly key: TemplateBindingIdentifier;
|
1333 | readonly value: ASTWithSource | null;
|
1334 | |
1335 |
|
1336 |
|
1337 |
|
1338 |
|
1339 |
|
1340 |
|
1341 |
|
1342 |
|
1343 |
|
1344 | constructor(sourceSpan: AbsoluteSourceSpan, key: TemplateBindingIdentifier, value: ASTWithSource | null);
|
1345 | }
|
1346 |
|
1347 | declare interface ExpressionKeyFn {
|
1348 | keyOf(expr: outputAst.Expression): string;
|
1349 | }
|
1350 |
|
1351 | export declare class ExpressionStatement extends Statement {
|
1352 | expr: Expression;
|
1353 | constructor(expr: Expression, sourceSpan?: ParseSourceSpan | null, leadingComments?: LeadingComment[]);
|
1354 | isEquivalent(stmt: Statement): boolean;
|
1355 | visitStatement(visitor: StatementVisitor, context: any): any;
|
1356 | }
|
1357 |
|
1358 | export declare class ExpressionType extends Type {
|
1359 | value: Expression;
|
1360 | typeParams: Type[] | null;
|
1361 | constructor(value: Expression, modifiers?: TypeModifier, typeParams?: Type[] | null);
|
1362 | visitType(visitor: TypeVisitor, context: any): any;
|
1363 | }
|
1364 |
|
1365 | declare function expressionType(expr: Expression, typeModifiers?: TypeModifier, typeParams?: Type[] | null): ExpressionType;
|
1366 |
|
1367 | export declare interface ExpressionVisitor {
|
1368 | visitReadVarExpr(ast: ReadVarExpr, context: any): any;
|
1369 | visitWriteVarExpr(expr: WriteVarExpr, context: any): any;
|
1370 | visitWriteKeyExpr(expr: WriteKeyExpr, context: any): any;
|
1371 | visitWritePropExpr(expr: WritePropExpr, context: any): any;
|
1372 | visitInvokeFunctionExpr(ast: InvokeFunctionExpr, context: any): any;
|
1373 | visitTaggedTemplateExpr(ast: TaggedTemplateExpr, context: any): any;
|
1374 | visitInstantiateExpr(ast: InstantiateExpr, context: any): any;
|
1375 | visitLiteralExpr(ast: LiteralExpr, context: any): any;
|
1376 | visitLocalizedString(ast: LocalizedString, context: any): any;
|
1377 | visitExternalExpr(ast: ExternalExpr, context: any): any;
|
1378 | visitConditionalExpr(ast: ConditionalExpr, context: any): any;
|
1379 | visitDynamicImportExpr(ast: DynamicImportExpr, context: any): any;
|
1380 | visitNotExpr(ast: NotExpr, context: any): any;
|
1381 | visitFunctionExpr(ast: FunctionExpr, context: any): any;
|
1382 | visitUnaryOperatorExpr(ast: UnaryOperatorExpr, context: any): any;
|
1383 | visitBinaryOperatorExpr(ast: BinaryOperatorExpr, context: any): any;
|
1384 | visitReadPropExpr(ast: ReadPropExpr, context: any): any;
|
1385 | visitReadKeyExpr(ast: ReadKeyExpr, context: any): any;
|
1386 | visitLiteralArrayExpr(ast: LiteralArrayExpr, context: any): any;
|
1387 | visitLiteralMapExpr(ast: LiteralMapExpr, context: any): any;
|
1388 | visitCommaExpr(ast: CommaExpr, context: any): any;
|
1389 | visitWrappedNodeExpr(ast: WrappedNodeExpr<any>, context: any): any;
|
1390 | visitTypeofExpr(ast: TypeofExpr, context: any): any;
|
1391 | visitArrowFunctionExpr(ast: ArrowFunctionExpr, context: any): any;
|
1392 | }
|
1393 |
|
1394 | export declare class ExternalExpr extends Expression {
|
1395 | value: ExternalReference;
|
1396 | typeParams: Type[] | null;
|
1397 | constructor(value: ExternalReference, type?: Type | null, typeParams?: Type[] | null, sourceSpan?: ParseSourceSpan | null);
|
1398 | isEquivalent(e: Expression): boolean;
|
1399 | isConstant(): boolean;
|
1400 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
1401 | clone(): ExternalExpr;
|
1402 | }
|
1403 |
|
1404 | export declare class ExternalReference {
|
1405 | moduleName: string | null;
|
1406 | name: string | null;
|
1407 | constructor(moduleName: string | null, name: string | null);
|
1408 | }
|
1409 |
|
1410 | declare interface ExternalReferenceResolver {
|
1411 | resolveExternalReference(ref: outputAst.ExternalReference): unknown;
|
1412 | }
|
1413 |
|
1414 | export declare enum FactoryTarget {
|
1415 | Directive = 0,
|
1416 | Component = 1,
|
1417 | Injectable = 2,
|
1418 | Pipe = 3,
|
1419 | NgModule = 4
|
1420 | }
|
1421 |
|
1422 | declare enum FactoryTarget_2 {
|
1423 | Directive = 0,
|
1424 | Component = 1,
|
1425 | Injectable = 2,
|
1426 | Pipe = 3,
|
1427 | NgModule = 4
|
1428 | }
|
1429 |
|
1430 |
|
1431 |
|
1432 |
|
1433 |
|
1434 |
|
1435 |
|
1436 |
|
1437 |
|
1438 |
|
1439 |
|
1440 |
|
1441 |
|
1442 |
|
1443 |
|
1444 | export declare function findMatchingDirectivesAndPipes(template: string, directiveSelectors: string[]): {
|
1445 | directives: {
|
1446 | regular: string[];
|
1447 | deferCandidates: string[];
|
1448 | };
|
1449 | pipes: {
|
1450 | regular: string[];
|
1451 | deferCandidates: string[];
|
1452 | };
|
1453 | };
|
1454 |
|
1455 | declare function fn(params: FnParam[], body: Statement[], type?: Type | null, sourceSpan?: ParseSourceSpan | null, name?: string | null): FunctionExpr;
|
1456 |
|
1457 | declare class FnParam {
|
1458 | name: string;
|
1459 | type: Type | null;
|
1460 | constructor(name: string, type?: Type | null);
|
1461 | isEquivalent(param: FnParam): boolean;
|
1462 | clone(): FnParam;
|
1463 | }
|
1464 |
|
1465 | /**
|
1466 | * Specifies how a forward ref has been handled in a MaybeForwardRefExpression
|
1467 | */
|
1468 | export declare const enum ForwardRefHandling {
|
1469 |
|
1470 | None = 0,
|
1471 |
|
1472 | Wrapped = 1,
|
1473 |
|
1474 | Unwrapped = 2
|
1475 | }
|
1476 |
|
1477 | declare const FUNCTION_TYPE: BuiltinType;
|
1478 |
|
1479 | export declare class FunctionExpr extends Expression {
|
1480 | params: FnParam[];
|
1481 | statements: Statement[];
|
1482 | name?: (string | null) | undefined;
|
1483 | constructor(params: FnParam[], statements: Statement[], type?: Type | null, sourceSpan?: ParseSourceSpan | null, name?: (string | null) | undefined);
|
1484 | isEquivalent(e: Expression | Statement): boolean;
|
1485 | isConstant(): boolean;
|
1486 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
1487 | toDeclStmt(name: string, modifiers?: StmtModifier): DeclareFunctionStmt;
|
1488 | clone(): FunctionExpr;
|
1489 | }
|
1490 |
|
1491 | export declare function getHtmlTagDefinition(tagName: string): HtmlTagDefinition;
|
1492 |
|
1493 | export declare function getNsPrefix(fullName: string): string;
|
1494 |
|
1495 | export declare function getNsPrefix(fullName: null): null;
|
1496 |
|
1497 | export declare function getSafePropertyAccessString(accessor: string, name: string): string;
|
1498 |
|
1499 | declare interface HostBinding {
|
1500 | hostPropertyName?: string;
|
1501 | }
|
1502 |
|
1503 | declare interface HostListener {
|
1504 | eventName?: string;
|
1505 | args?: string[];
|
1506 | }
|
1507 |
|
1508 | declare interface HostListeners {
|
1509 | [key: string]: string;
|
1510 | }
|
1511 |
|
1512 | declare interface HostProperties {
|
1513 | [key: string]: string;
|
1514 | }
|
1515 |
|
1516 | declare namespace html {
|
1517 | export {
|
1518 | visitAll,
|
1519 | Node_2 as Node,
|
1520 | NodeWithI18n,
|
1521 | Text_2 as Text,
|
1522 | Expansion,
|
1523 | ExpansionCase,
|
1524 | Attribute,
|
1525 | Element_2 as Element,
|
1526 | Comment_2 as Comment,
|
1527 | Block,
|
1528 | BlockParameter,
|
1529 | LetDeclaration,
|
1530 | Visitor,
|
1531 | RecursiveVisitor
|
1532 | }
|
1533 | }
|
1534 |
|
1535 | export declare class HtmlParser extends Parser_2 {
|
1536 | constructor();
|
1537 | parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult;
|
1538 | }
|
1539 |
|
1540 | export declare class HtmlTagDefinition implements TagDefinition {
|
1541 | private closedByChildren;
|
1542 | private contentType;
|
1543 | closedByParent: boolean;
|
1544 | implicitNamespacePrefix: string | null;
|
1545 | isVoid: boolean;
|
1546 | ignoreFirstLf: boolean;
|
1547 | canSelfClose: boolean;
|
1548 | preventNamespaceInheritance: boolean;
|
1549 | constructor({ closedByChildren, implicitNamespacePrefix, contentType, closedByParent, isVoid, ignoreFirstLf, preventNamespaceInheritance, canSelfClose, }?: {
|
1550 | closedByChildren?: string[];
|
1551 | closedByParent?: boolean;
|
1552 | implicitNamespacePrefix?: string;
|
1553 | contentType?: TagContentType | {
|
1554 | default: TagContentType;
|
1555 | [namespace: string]: TagContentType;
|
1556 | };
|
1557 | isVoid?: boolean;
|
1558 | ignoreFirstLf?: boolean;
|
1559 | preventNamespaceInheritance?: boolean;
|
1560 | canSelfClose?: boolean;
|
1561 | });
|
1562 | isClosedByChild(name: string): boolean;
|
1563 | getContentType(prefix?: string): TagContentType;
|
1564 | }
|
1565 |
|
1566 | declare namespace i18n {
|
1567 | export {
|
1568 | MessagePlaceholder,
|
1569 | Message,
|
1570 | MessageSpan,
|
1571 | Node_3 as Node,
|
1572 | Text_3 as Text,
|
1573 | Container,
|
1574 | Icu,
|
1575 | TagPlaceholder,
|
1576 | Placeholder,
|
1577 | IcuPlaceholder,
|
1578 | BlockPlaceholder,
|
1579 | I18nMeta_2 as I18nMeta,
|
1580 | Visitor_2 as Visitor,
|
1581 | CloneVisitor,
|
1582 | RecurseVisitor
|
1583 | }
|
1584 | }
|
1585 |
|
1586 | export declare class I18NHtmlParser implements HtmlParser {
|
1587 | private _htmlParser;
|
1588 | getTagDefinition: any;
|
1589 | private _translationBundle;
|
1590 | constructor(_htmlParser: HtmlParser, translations?: string, translationsFormat?: string, missingTranslation?: MissingTranslationStrategy, console?: Console_2);
|
1591 | parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult;
|
1592 | }
|
1593 |
|
1594 | declare type I18nMeta = {
|
1595 | id?: string;
|
1596 | customId?: string;
|
1597 | legacyIds?: string[];
|
1598 | description?: string;
|
1599 | meaning?: string;
|
1600 | };
|
1601 |
|
1602 |
|
1603 |
|
1604 |
|
1605 |
|
1606 |
|
1607 |
|
1608 | declare type I18nMeta_2 = Message | Node_3;
|
1609 |
|
1610 | declare class Icu implements Node_3 {
|
1611 | expression: string;
|
1612 | type: string;
|
1613 | cases: {
|
1614 | [k: string]: Node_3;
|
1615 | };
|
1616 | sourceSpan: ParseSourceSpan;
|
1617 | expressionPlaceholder?: string | undefined;
|
1618 | constructor(expression: string, type: string, cases: {
|
1619 | [k: string]: Node_3;
|
1620 | }, sourceSpan: ParseSourceSpan, expressionPlaceholder?: string | undefined);
|
1621 | visit(visitor: Visitor_2, context?: any): any;
|
1622 | }
|
1623 |
|
1624 | declare class IcuPlaceholder implements Node_3 {
|
1625 | value: Icu;
|
1626 | name: string;
|
1627 | sourceSpan: ParseSourceSpan;
|
1628 |
|
1629 | previousMessage?: Message;
|
1630 | constructor(value: Icu, name: string, sourceSpan: ParseSourceSpan);
|
1631 | visit(visitor: Visitor_2, context?: any): any;
|
1632 | }
|
1633 |
|
1634 | export declare function identifierName(compileIdentifier: CompileIdentifierMetadata | null | undefined): string | null;
|
1635 |
|
1636 | export declare class IfStmt extends Statement {
|
1637 | condition: Expression;
|
1638 | trueCase: Statement[];
|
1639 | falseCase: Statement[];
|
1640 | constructor(condition: Expression, trueCase: Statement[], falseCase?: Statement[], sourceSpan?: ParseSourceSpan | null, leadingComments?: LeadingComment[]);
|
1641 | isEquivalent(stmt: Statement): boolean;
|
1642 | visitStatement(visitor: StatementVisitor, context: any): any;
|
1643 | }
|
1644 |
|
1645 | declare function ifStmt(condition: Expression, thenClause: Statement[], elseClause?: Statement[], sourceSpan?: ParseSourceSpan, leadingComments?: LeadingComment[]): IfStmt;
|
1646 |
|
1647 | export declare class ImplicitReceiver extends AST {
|
1648 | visit(visitor: AstVisitor, context?: any): any;
|
1649 | }
|
1650 |
|
1651 | declare function importExpr(id: ExternalReference, typeParams?: Type[] | null, sourceSpan?: ParseSourceSpan | null): ExternalExpr;
|
1652 |
|
1653 | declare function importType(id: ExternalReference, typeParams?: Type[] | null, typeModifiers?: TypeModifier): ExpressionType | null;
|
1654 |
|
1655 | declare const INFERRED_TYPE: BuiltinType;
|
1656 |
|
1657 |
|
1658 |
|
1659 |
|
1660 | declare const enum InjectFlags {
|
1661 | Default = 0,
|
1662 | |
1663 |
|
1664 |
|
1665 |
|
1666 | Host = 1,
|
1667 |
|
1668 | Self = 2,
|
1669 |
|
1670 | SkipSelf = 4,
|
1671 |
|
1672 | Optional = 8
|
1673 | }
|
1674 |
|
1675 | declare interface Input {
|
1676 | alias?: string;
|
1677 | required?: boolean;
|
1678 | transform?: (value: any) => any;
|
1679 | isSignal: boolean;
|
1680 | }
|
1681 |
|
1682 |
|
1683 | declare enum InputFlags {
|
1684 | None = 0,
|
1685 | SignalBased = 1,
|
1686 | HasDecoratorInputTransform = 2
|
1687 | }
|
1688 |
|
1689 |
|
1690 |
|
1691 |
|
1692 |
|
1693 |
|
1694 |
|
1695 | export declare interface InputOutputPropertySet {
|
1696 | hasBindingPropertyName(propertyName: string): boolean;
|
1697 | }
|
1698 |
|
1699 | export declare class InstantiateExpr extends Expression {
|
1700 | classExpr: Expression;
|
1701 | args: Expression[];
|
1702 | constructor(classExpr: Expression, args: Expression[], type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
1703 | isEquivalent(e: Expression): boolean;
|
1704 | isConstant(): boolean;
|
1705 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
1706 | clone(): InstantiateExpr;
|
1707 | }
|
1708 |
|
1709 | declare const INT_TYPE: BuiltinType;
|
1710 |
|
1711 | declare type InterpolatedAttributeToken = AttributeValueTextToken | AttributeValueInterpolationToken | EncodedEntityToken;
|
1712 |
|
1713 | declare type InterpolatedTextToken = TextToken | InterpolationToken | EncodedEntityToken;
|
1714 |
|
1715 | export declare class Interpolation extends AST {
|
1716 | strings: string[];
|
1717 | expressions: AST[];
|
1718 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, strings: string[], expressions: AST[]);
|
1719 | visit(visitor: AstVisitor, context?: any): any;
|
1720 | }
|
1721 |
|
1722 |
|
1723 | export declare class InterpolationConfig {
|
1724 | start: string;
|
1725 | end: string;
|
1726 | static fromArray(markers: [string, string] | null): InterpolationConfig;
|
1727 | constructor(start: string, end: string);
|
1728 | }
|
1729 |
|
1730 | export declare interface InterpolationPiece {
|
1731 | text: string;
|
1732 | start: number;
|
1733 | end: number;
|
1734 | }
|
1735 |
|
1736 | declare interface InterpolationToken extends TokenBase {
|
1737 | type: LexerTokenType.INTERPOLATION;
|
1738 | parts: [startMarker: string, expression: string, endMarker: string] | [startMarker: string, expression: string];
|
1739 | }
|
1740 |
|
1741 | export declare class InvokeFunctionExpr extends Expression {
|
1742 | fn: Expression;
|
1743 | args: Expression[];
|
1744 | pure: boolean;
|
1745 | constructor(fn: Expression, args: Expression[], type?: Type | null, sourceSpan?: ParseSourceSpan | null, pure?: boolean);
|
1746 | get receiver(): Expression;
|
1747 | isEquivalent(e: Expression): boolean;
|
1748 | isConstant(): boolean;
|
1749 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
1750 | clone(): InvokeFunctionExpr;
|
1751 | }
|
1752 |
|
1753 | export declare function isNgContainer(tagName: string): boolean;
|
1754 |
|
1755 | export declare function isNgContent(tagName: string): boolean;
|
1756 |
|
1757 | export declare function isNgTemplate(tagName: string): boolean;
|
1758 |
|
1759 | declare function isNull(exp: Expression): boolean;
|
1760 |
|
1761 | /**
|
1762 | * A helper class to manage the evaluation of JIT generated code.
|
1763 | */
|
1764 | export declare class JitEvaluator {
|
1765 | |
1766 |
|
1767 |
|
1768 |
|
1769 |
|
1770 |
|
1771 |
|
1772 |
|
1773 |
|
1774 | evaluateStatements(sourceUrl: string, statements: outputAst.Statement[], refResolver: ExternalReferenceResolver, createSourceMaps: boolean): {
|
1775 | [key: string]: any;
|
1776 | };
|
1777 | |
1778 |
|
1779 |
|
1780 |
|
1781 |
|
1782 |
|
1783 |
|
1784 |
|
1785 |
|
1786 |
|
1787 | evaluateCode(sourceUrl: string, ctx: EmitterVisitorContext, vars: {
|
1788 | [key: string]: any;
|
1789 | }, createSourceMap: boolean): any;
|
1790 | |
1791 |
|
1792 |
|
1793 |
|
1794 |
|
1795 |
|
1796 |
|
1797 |
|
1798 |
|
1799 |
|
1800 | executeFunction(fn: Function, args: any[]): any;
|
1801 | }
|
1802 |
|
1803 | export declare class JSDocComment extends LeadingComment {
|
1804 | tags: JSDocTag[];
|
1805 | constructor(tags: JSDocTag[]);
|
1806 | toString(): string;
|
1807 | }
|
1808 |
|
1809 | export declare function jsDocComment(tags?: JSDocTag[]): JSDocComment;
|
1810 |
|
1811 | declare type JSDocTag = {
|
1812 | tagName: JSDocTagName | string;
|
1813 | text?: string;
|
1814 | } | {
|
1815 | tagName?: undefined;
|
1816 | text: string;
|
1817 | };
|
1818 |
|
1819 | declare const enum JSDocTagName {
|
1820 | Desc = "desc",
|
1821 | Id = "id",
|
1822 | Meaning = "meaning",
|
1823 | Suppress = "suppress"
|
1824 | }
|
1825 |
|
1826 | export declare class KeyedRead extends AST {
|
1827 | receiver: AST;
|
1828 | key: AST;
|
1829 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, receiver: AST, key: AST);
|
1830 | visit(visitor: AstVisitor, context?: any): any;
|
1831 | }
|
1832 |
|
1833 | export declare class KeyedWrite extends AST {
|
1834 | receiver: AST;
|
1835 | key: AST;
|
1836 | value: AST;
|
1837 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, receiver: AST, key: AST, value: AST);
|
1838 | visit(visitor: AstVisitor, context?: any): any;
|
1839 | }
|
1840 |
|
1841 | export declare class LeadingComment {
|
1842 | text: string;
|
1843 | multiline: boolean;
|
1844 | trailingNewline: boolean;
|
1845 | constructor(text: string, multiline: boolean, trailingNewline: boolean);
|
1846 | toString(): string;
|
1847 | }
|
1848 |
|
1849 | export declare function leadingComment(text: string, multiline?: boolean, trailingNewline?: boolean): LeadingComment;
|
1850 |
|
1851 | export declare type LegacyInputPartialMapping = string | [bindingPropertyName: string, classPropertyName: string, transformFunction?: outputAst.Expression];
|
1852 |
|
1853 | export declare class LetDeclaration implements BaseNode {
|
1854 | name: string;
|
1855 | value: string;
|
1856 | sourceSpan: ParseSourceSpan;
|
1857 | readonly nameSpan: ParseSourceSpan;
|
1858 | valueSpan: ParseSourceSpan;
|
1859 | constructor(name: string, value: string, sourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, valueSpan: ParseSourceSpan);
|
1860 | visit(visitor: Visitor, context: any): any;
|
1861 | }
|
1862 |
|
1863 | export declare class Lexer {
|
1864 | tokenize(text: string): Token[];
|
1865 | }
|
1866 |
|
1867 | export declare interface LexerRange {
|
1868 | startPos: number;
|
1869 | startLine: number;
|
1870 | startCol: number;
|
1871 | endPos: number;
|
1872 | }
|
1873 |
|
1874 | export declare const enum LexerTokenType {
|
1875 | TAG_OPEN_START = 0,
|
1876 | TAG_OPEN_END = 1,
|
1877 | TAG_OPEN_END_VOID = 2,
|
1878 | TAG_CLOSE = 3,
|
1879 | INCOMPLETE_TAG_OPEN = 4,
|
1880 | TEXT = 5,
|
1881 | ESCAPABLE_RAW_TEXT = 6,
|
1882 | RAW_TEXT = 7,
|
1883 | INTERPOLATION = 8,
|
1884 | ENCODED_ENTITY = 9,
|
1885 | COMMENT_START = 10,
|
1886 | COMMENT_END = 11,
|
1887 | CDATA_START = 12,
|
1888 | CDATA_END = 13,
|
1889 | ATTR_NAME = 14,
|
1890 | ATTR_QUOTE = 15,
|
1891 | ATTR_VALUE_TEXT = 16,
|
1892 | ATTR_VALUE_INTERPOLATION = 17,
|
1893 | DOC_TYPE = 18,
|
1894 | EXPANSION_FORM_START = 19,
|
1895 | EXPANSION_CASE_VALUE = 20,
|
1896 | EXPANSION_CASE_EXP_START = 21,
|
1897 | EXPANSION_CASE_EXP_END = 22,
|
1898 | EXPANSION_FORM_END = 23,
|
1899 | BLOCK_OPEN_START = 24,
|
1900 | BLOCK_OPEN_END = 25,
|
1901 | BLOCK_CLOSE = 26,
|
1902 | BLOCK_PARAMETER = 27,
|
1903 | INCOMPLETE_BLOCK_OPEN = 28,
|
1904 | LET_START = 29,
|
1905 | LET_VALUE = 30,
|
1906 | LET_END = 31,
|
1907 | INCOMPLETE_LET = 32,
|
1908 | EOF = 33
|
1909 | }
|
1910 |
|
1911 | export declare function literal(value: any, type?: Type | null, sourceSpan?: ParseSourceSpan | null): LiteralExpr;
|
1912 |
|
1913 | declare function literalArr(values: Expression[], type?: Type | null, sourceSpan?: ParseSourceSpan | null): LiteralArrayExpr;
|
1914 |
|
1915 | export declare class LiteralArray extends AST {
|
1916 | expressions: any[];
|
1917 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expressions: any[]);
|
1918 | visit(visitor: AstVisitor, context?: any): any;
|
1919 | }
|
1920 |
|
1921 | export declare class LiteralArrayExpr extends Expression {
|
1922 | entries: Expression[];
|
1923 | constructor(entries: Expression[], type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
1924 | isConstant(): boolean;
|
1925 | isEquivalent(e: Expression): boolean;
|
1926 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
1927 | clone(): LiteralArrayExpr;
|
1928 | }
|
1929 |
|
1930 | export declare class LiteralExpr extends Expression {
|
1931 | value: number | string | boolean | null | undefined;
|
1932 | constructor(value: number | string | boolean | null | undefined, type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
1933 | isEquivalent(e: Expression): boolean;
|
1934 | isConstant(): boolean;
|
1935 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
1936 | clone(): LiteralExpr;
|
1937 | }
|
1938 |
|
1939 | export declare class LiteralMap extends AST {
|
1940 | keys: LiteralMapKey[];
|
1941 | values: any[];
|
1942 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, keys: LiteralMapKey[], values: any[]);
|
1943 | visit(visitor: AstVisitor, context?: any): any;
|
1944 | }
|
1945 |
|
1946 | export declare function literalMap(values: {
|
1947 | key: string;
|
1948 | quoted: boolean;
|
1949 | value: Expression;
|
1950 | }[], type?: MapType | null): LiteralMapExpr;
|
1951 |
|
1952 | declare class LiteralMapEntry {
|
1953 | key: string;
|
1954 | value: Expression;
|
1955 | quoted: boolean;
|
1956 | constructor(key: string, value: Expression, quoted: boolean);
|
1957 | isEquivalent(e: LiteralMapEntry): boolean;
|
1958 | clone(): LiteralMapEntry;
|
1959 | }
|
1960 |
|
1961 | export declare class LiteralMapExpr extends Expression {
|
1962 | entries: LiteralMapEntry[];
|
1963 | valueType: Type | null;
|
1964 | constructor(entries: LiteralMapEntry[], type?: MapType | null, sourceSpan?: ParseSourceSpan | null);
|
1965 | isEquivalent(e: Expression): boolean;
|
1966 | isConstant(): boolean;
|
1967 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
1968 | clone(): LiteralMapExpr;
|
1969 | }
|
1970 |
|
1971 | export declare type LiteralMapKey = {
|
1972 | key: string;
|
1973 | quoted: boolean;
|
1974 | isShorthandInitialized?: boolean;
|
1975 | };
|
1976 |
|
1977 | declare class LiteralPiece {
|
1978 | text: string;
|
1979 | sourceSpan: ParseSourceSpan;
|
1980 | constructor(text: string, sourceSpan: ParseSourceSpan);
|
1981 | }
|
1982 |
|
1983 | export declare class LiteralPrimitive extends AST {
|
1984 | value: any;
|
1985 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, value: any);
|
1986 | visit(visitor: AstVisitor, context?: any): any;
|
1987 | }
|
1988 |
|
1989 | export declare class LocalizedString extends Expression {
|
1990 | readonly metaBlock: I18nMeta;
|
1991 | readonly messageParts: LiteralPiece[];
|
1992 | readonly placeHolderNames: PlaceholderPiece[];
|
1993 | readonly expressions: Expression[];
|
1994 | constructor(metaBlock: I18nMeta, messageParts: LiteralPiece[], placeHolderNames: PlaceholderPiece[], expressions: Expression[], sourceSpan?: ParseSourceSpan | null);
|
1995 | isEquivalent(e: Expression): boolean;
|
1996 | isConstant(): boolean;
|
1997 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
1998 | clone(): LocalizedString;
|
1999 | /**
|
2000 | * Serialize the given `meta` and `messagePart` into "cooked" and "raw" strings that can be used
|
2001 | * in a `$localize` tagged string. The format of the metadata is the same as that parsed by
|
2002 | * `parseI18nMeta()`.
|
2003 | *
|
2004 | * @param meta The metadata to serialize
|
2005 | * @param messagePart The first part of the tagged string
|
2006 | */
|
2007 | serializeI18nHead(): CookedRawString;
|
2008 | getMessagePartSourceSpan(i: number): ParseSourceSpan | null;
|
2009 | getPlaceholderSourceSpan(i: number): ParseSourceSpan;
|
2010 | /**
|
2011 | * Serialize the given `placeholderName` and `messagePart` into "cooked" and "raw" strings that
|
2012 | * can be used in a `$localize` tagged string.
|
2013 | *
|
2014 | * The format is `:<placeholder-name>[@@<associated-id>]:`.
|
2015 | *
|
2016 | * The `associated-id` is the message id of the (usually an ICU) message to which this placeholder
|
2017 | * refers.
|
2018 | *
|
2019 | * @param partIndex The index of the message part to serialize.
|
2020 | */
|
2021 | serializeI18nTemplatePart(partIndex: number): CookedRawString;
|
2022 | }
|
2023 |
|
2024 | declare function localizedString(metaBlock: I18nMeta, messageParts: LiteralPiece[], placeholderNames: PlaceholderPiece[], expressions: Expression[], sourceSpan?: ParseSourceSpan | null): LocalizedString;
|
2025 |
|
2026 | /**
|
2027 | * Construct a `BindingParser` with a default configuration.
|
2028 | */
|
2029 | export declare function makeBindingParser(interpolationConfig?: InterpolationConfig): BindingParser;
|
2030 |
|
2031 | export declare class MapType extends Type {
|
2032 | valueType: Type | null;
|
2033 | constructor(valueType: Type | null | undefined, modifiers?: TypeModifier);
|
2034 | visitType(visitor: TypeVisitor, context: any): any;
|
2035 | }
|
2036 |
|
2037 | /**
|
2038 | * Describes an expression that may have been wrapped in a `forwardRef()` guard.
|
2039 | *
|
2040 | * This is used when describing expressions that can refer to types that may eagerly reference types
|
2041 | * that have not yet been defined.
|
2042 | */
|
2043 | export declare interface MaybeForwardRefExpression<T extends outputAst.Expression = outputAst.Expression> {
|
2044 | |
2045 |
|
2046 |
|
2047 | expression: T;
|
2048 | |
2049 |
|
2050 |
|
2051 |
|
2052 |
|
2053 |
|
2054 |
|
2055 |
|
2056 |
|
2057 |
|
2058 |
|
2059 |
|
2060 |
|
2061 |
|
2062 |
|
2063 |
|
2064 |
|
2065 |
|
2066 |
|
2067 | forwardRef: ForwardRefHandling;
|
2068 | }
|
2069 |
|
2070 | export declare function mergeNsAndName(prefix: string, localName: string): string;
|
2071 |
|
2072 | declare class Message {
|
2073 | nodes: Node_3[];
|
2074 | placeholders: {
|
2075 | [phName: string]: MessagePlaceholder;
|
2076 | };
|
2077 | placeholderToMessage: {
|
2078 | [phName: string]: Message;
|
2079 | };
|
2080 | meaning: string;
|
2081 | description: string;
|
2082 | customId: string;
|
2083 | sources: MessageSpan[];
|
2084 | id: string;
|
2085 |
|
2086 | legacyIds: string[];
|
2087 | messageString: string;
|
2088 | |
2089 |
|
2090 |
|
2091 |
|
2092 |
|
2093 |
|
2094 |
|
2095 |
|
2096 | constructor(nodes: Node_3[], placeholders: {
|
2097 | [phName: string]: MessagePlaceholder;
|
2098 | }, placeholderToMessage: {
|
2099 | [phName: string]: Message;
|
2100 | }, meaning: string, description: string, customId: string);
|
2101 | }
|
2102 |
|
2103 | /**
|
2104 | * A container for message extracted from the templates.
|
2105 | */
|
2106 | export declare class MessageBundle {
|
2107 | private _htmlParser;
|
2108 | private _implicitTags;
|
2109 | private _implicitAttrs;
|
2110 | private _locale;
|
2111 | private readonly _preserveWhitespace;
|
2112 | private _messages;
|
2113 | constructor(_htmlParser: HtmlParser, _implicitTags: string[], _implicitAttrs: {
|
2114 | [k: string]: string[];
|
2115 | }, _locale?: string | null, _preserveWhitespace?: boolean);
|
2116 | updateFromTemplate(source: string, url: string, interpolationConfig: InterpolationConfig): ParseError[];
|
2117 | getMessages(): i18n.Message[];
|
2118 | write(serializer: Serializer, filterSources?: (path: string) => string): string;
|
2119 | }
|
2120 |
|
2121 | declare type MessagePiece = LiteralPiece | PlaceholderPiece;
|
2122 |
|
2123 | /**
|
2124 | * Describes the text contents of a placeholder as it appears in an ICU expression, including its
|
2125 | * source span information.
|
2126 | */
|
2127 | declare interface MessagePlaceholder {
|
2128 |
|
2129 | text: string;
|
2130 |
|
2131 | sourceSpan: ParseSourceSpan;
|
2132 | }
|
2133 |
|
2134 | declare interface MessageSpan {
|
2135 | filePath: string;
|
2136 | startLine: number;
|
2137 | startCol: number;
|
2138 | endLine: number;
|
2139 | endCol: number;
|
2140 | }
|
2141 |
|
2142 | declare enum MissingTranslationStrategy {
|
2143 | Error = 0,
|
2144 | Warning = 1,
|
2145 | Ignore = 2
|
2146 | }
|
2147 |
|
2148 | export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
|
2149 |
|
2150 | declare type Node_2 = Attribute | Comment_2 | Element_2 | Expansion | ExpansionCase | Text_2 | Block | BlockParameter;
|
2151 | export { Node_2 as Node }
|
2152 |
|
2153 | declare interface Node_3 {
|
2154 | sourceSpan: ParseSourceSpan;
|
2155 | visit(visitor: Visitor_2, context?: any): any;
|
2156 | }
|
2157 |
|
2158 | export declare abstract class NodeWithI18n implements BaseNode {
|
2159 | sourceSpan: ParseSourceSpan;
|
2160 | i18n?: I18nMeta_2 | undefined;
|
2161 | constructor(sourceSpan: ParseSourceSpan, i18n?: I18nMeta_2 | undefined);
|
2162 | abstract visit(visitor: Visitor, context: any): any;
|
2163 | }
|
2164 |
|
2165 | export declare const NONE_TYPE: BuiltinType;
|
2166 |
|
2167 | export declare class NonNullAssert extends AST {
|
2168 | expression: AST;
|
2169 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expression: AST);
|
2170 | visit(visitor: AstVisitor, context?: any): any;
|
2171 | }
|
2172 |
|
2173 | declare function not(expr: Expression, sourceSpan?: ParseSourceSpan | null): NotExpr;
|
2174 |
|
2175 | export declare class NotExpr extends Expression {
|
2176 | condition: Expression;
|
2177 | constructor(condition: Expression, sourceSpan?: ParseSourceSpan | null);
|
2178 | isEquivalent(e: Expression): boolean;
|
2179 | isConstant(): boolean;
|
2180 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
2181 | clone(): NotExpr;
|
2182 | }
|
2183 |
|
2184 | declare const NULL_EXPR: LiteralExpr;
|
2185 |
|
2186 | declare function nullSafeIsEquivalent<T extends {
|
2187 | isEquivalent(other: T): boolean;
|
2188 | }>(base: T | null, other: T | null): boolean;
|
2189 |
|
2190 | declare const NUMBER_TYPE: BuiltinType;
|
2191 |
|
2192 | declare interface Output {
|
2193 | alias?: string;
|
2194 | }
|
2195 |
|
2196 | declare namespace outputAst {
|
2197 | export {
|
2198 | nullSafeIsEquivalent,
|
2199 | areAllEquivalent,
|
2200 | leadingComment,
|
2201 | jsDocComment,
|
2202 | variable,
|
2203 | importExpr,
|
2204 | importType,
|
2205 | expressionType,
|
2206 | transplantedType,
|
2207 | typeofExpr,
|
2208 | literalArr,
|
2209 | literalMap,
|
2210 | unary,
|
2211 | not,
|
2212 | fn,
|
2213 | arrowFn,
|
2214 | ifStmt,
|
2215 | taggedTemplate,
|
2216 | literal,
|
2217 | localizedString,
|
2218 | isNull,
|
2219 | TypeModifier,
|
2220 | Type,
|
2221 | BuiltinTypeName,
|
2222 | BuiltinType,
|
2223 | ExpressionType,
|
2224 | ArrayType,
|
2225 | MapType,
|
2226 | TransplantedType,
|
2227 | DYNAMIC_TYPE,
|
2228 | INFERRED_TYPE,
|
2229 | BOOL_TYPE,
|
2230 | INT_TYPE,
|
2231 | NUMBER_TYPE,
|
2232 | STRING_TYPE,
|
2233 | FUNCTION_TYPE,
|
2234 | NONE_TYPE,
|
2235 | TypeVisitor,
|
2236 | UnaryOperator,
|
2237 | BinaryOperator,
|
2238 | Expression,
|
2239 | ReadVarExpr,
|
2240 | TypeofExpr,
|
2241 | WrappedNodeExpr,
|
2242 | WriteVarExpr,
|
2243 | WriteKeyExpr,
|
2244 | WritePropExpr,
|
2245 | InvokeFunctionExpr,
|
2246 | TaggedTemplateExpr,
|
2247 | InstantiateExpr,
|
2248 | LiteralExpr,
|
2249 | TemplateLiteral,
|
2250 | TemplateLiteralElement,
|
2251 | LiteralPiece,
|
2252 | PlaceholderPiece,
|
2253 | MessagePiece,
|
2254 | LocalizedString,
|
2255 | CookedRawString,
|
2256 | ExternalExpr,
|
2257 | ExternalReference,
|
2258 | ConditionalExpr,
|
2259 | DynamicImportExpr,
|
2260 | NotExpr,
|
2261 | FnParam,
|
2262 | FunctionExpr,
|
2263 | ArrowFunctionExpr,
|
2264 | UnaryOperatorExpr,
|
2265 | BinaryOperatorExpr,
|
2266 | ReadPropExpr,
|
2267 | ReadKeyExpr,
|
2268 | LiteralArrayExpr,
|
2269 | LiteralMapEntry,
|
2270 | LiteralMapExpr,
|
2271 | CommaExpr,
|
2272 | ExpressionVisitor,
|
2273 | NULL_EXPR,
|
2274 | TYPED_NULL_EXPR,
|
2275 | StmtModifier,
|
2276 | LeadingComment,
|
2277 | JSDocComment,
|
2278 | Statement,
|
2279 | DeclareVarStmt,
|
2280 | DeclareFunctionStmt,
|
2281 | ExpressionStatement,
|
2282 | ReturnStatement,
|
2283 | IfStmt,
|
2284 | StatementVisitor,
|
2285 | RecursiveAstVisitor_2 as RecursiveAstVisitor,
|
2286 | JSDocTagName,
|
2287 | JSDocTag
|
2288 | }
|
2289 | }
|
2290 | export { outputAst }
|
2291 |
|
2292 | export declare class ParsedEvent {
|
2293 | name: string;
|
2294 | targetOrPhase: string;
|
2295 | type: ParsedEventType;
|
2296 | handler: ASTWithSource;
|
2297 | sourceSpan: ParseSourceSpan;
|
2298 | handlerSpan: ParseSourceSpan;
|
2299 | readonly keySpan: ParseSourceSpan;
|
2300 | constructor(name: string, targetOrPhase: string, type: ParsedEventType.TwoWay, handler: ASTWithSource<NonNullAssert | PropertyRead | KeyedRead>, sourceSpan: ParseSourceSpan, handlerSpan: ParseSourceSpan, keySpan: ParseSourceSpan);
|
2301 | constructor(name: string, targetOrPhase: string, type: ParsedEventType, handler: ASTWithSource, sourceSpan: ParseSourceSpan, handlerSpan: ParseSourceSpan, keySpan: ParseSourceSpan);
|
2302 | }
|
2303 |
|
2304 | export declare enum ParsedEventType {
|
2305 | Regular = 0,
|
2306 | Animation = 1,
|
2307 | TwoWay = 2
|
2308 | }
|
2309 |
|
2310 | export declare interface ParsedHostBindings {
|
2311 | attributes: {
|
2312 | [key: string]: outputAst.Expression;
|
2313 | };
|
2314 | listeners: {
|
2315 | [key: string]: string;
|
2316 | };
|
2317 | properties: {
|
2318 | [key: string]: string;
|
2319 | };
|
2320 | specialAttributes: {
|
2321 | styleAttr?: string;
|
2322 | classAttr?: string;
|
2323 | };
|
2324 | }
|
2325 |
|
2326 | export declare class ParsedProperty {
|
2327 | name: string;
|
2328 | expression: ASTWithSource;
|
2329 | type: ParsedPropertyType;
|
2330 | sourceSpan: ParseSourceSpan;
|
2331 | readonly keySpan: ParseSourceSpan;
|
2332 | valueSpan: ParseSourceSpan | undefined;
|
2333 | readonly isLiteral: boolean;
|
2334 | readonly isAnimation: boolean;
|
2335 | constructor(name: string, expression: ASTWithSource, type: ParsedPropertyType, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan: ParseSourceSpan | undefined);
|
2336 | }
|
2337 |
|
2338 | export declare enum ParsedPropertyType {
|
2339 | DEFAULT = 0,
|
2340 | LITERAL_ATTR = 1,
|
2341 | ANIMATION = 2,
|
2342 | TWO_WAY = 3
|
2343 | }
|
2344 |
|
2345 |
|
2346 |
|
2347 |
|
2348 |
|
2349 |
|
2350 |
|
2351 | export declare interface ParsedTemplate {
|
2352 | |
2353 |
|
2354 |
|
2355 | preserveWhitespaces?: boolean;
|
2356 | |
2357 |
|
2358 |
|
2359 | interpolationConfig?: InterpolationConfig;
|
2360 | |
2361 |
|
2362 |
|
2363 |
|
2364 |
|
2365 | errors: ParseError[] | null;
|
2366 | |
2367 |
|
2368 |
|
2369 | nodes: t.Node[];
|
2370 | |
2371 |
|
2372 |
|
2373 | styleUrls: string[];
|
2374 | |
2375 |
|
2376 |
|
2377 | styles: string[];
|
2378 | |
2379 |
|
2380 |
|
2381 | ngContentSelectors: string[];
|
2382 | |
2383 |
|
2384 |
|
2385 |
|
2386 | commentNodes?: t.Comment[];
|
2387 | }
|
2388 |
|
2389 |
|
2390 |
|
2391 |
|
2392 | export declare class ParsedVariable {
|
2393 | readonly name: string;
|
2394 | readonly value: string;
|
2395 | readonly sourceSpan: ParseSourceSpan;
|
2396 | readonly keySpan: ParseSourceSpan;
|
2397 | readonly valueSpan?: ParseSourceSpan | undefined;
|
2398 | constructor(name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan?: ParseSourceSpan | undefined);
|
2399 | }
|
2400 |
|
2401 | export declare class ParseError {
|
2402 |
|
2403 | readonly span: ParseSourceSpan;
|
2404 |
|
2405 | readonly msg: string;
|
2406 |
|
2407 | readonly level: ParseErrorLevel;
|
2408 | |
2409 |
|
2410 |
|
2411 |
|
2412 | readonly relatedError?: unknown;
|
2413 | constructor(
|
2414 |
|
2415 | span: ParseSourceSpan,
|
2416 |
|
2417 | msg: string,
|
2418 |
|
2419 | level?: ParseErrorLevel,
|
2420 | |
2421 |
|
2422 |
|
2423 |
|
2424 | relatedError?: unknown);
|
2425 | contextualMessage(): string;
|
2426 | toString(): string;
|
2427 | }
|
2428 |
|
2429 | export declare enum ParseErrorLevel {
|
2430 | WARNING = 0,
|
2431 | ERROR = 1
|
2432 | }
|
2433 |
|
2434 |
|
2435 |
|
2436 |
|
2437 | export declare const enum ParseFlags {
|
2438 | None = 0,
|
2439 | |
2440 |
|
2441 |
|
2442 | Action = 1
|
2443 | }
|
2444 |
|
2445 | export declare function parseHostBindings(host: {
|
2446 | [key: string]: string | outputAst.Expression;
|
2447 | }): ParsedHostBindings;
|
2448 |
|
2449 | export declare class ParseLocation {
|
2450 | file: ParseSourceFile;
|
2451 | offset: number;
|
2452 | line: number;
|
2453 | col: number;
|
2454 | constructor(file: ParseSourceFile, offset: number, line: number, col: number);
|
2455 | toString(): string;
|
2456 | moveBy(delta: number): ParseLocation;
|
2457 | getContext(maxChars: number, maxLines: number): {
|
2458 | before: string;
|
2459 | after: string;
|
2460 | } | null;
|
2461 | }
|
2462 |
|
2463 | export declare class Parser {
|
2464 | private _lexer;
|
2465 | private errors;
|
2466 | constructor(_lexer: Lexer);
|
2467 | parseAction(input: string, location: string, absoluteOffset: number, interpolationConfig?: InterpolationConfig): ASTWithSource;
|
2468 | parseBinding(input: string, location: string, absoluteOffset: number, interpolationConfig?: InterpolationConfig): ASTWithSource;
|
2469 | private checkSimpleExpression;
|
2470 | parseSimpleBinding(input: string, location: string, absoluteOffset: number, interpolationConfig?: InterpolationConfig): ASTWithSource;
|
2471 | private _reportError;
|
2472 | private _parseBindingAst;
|
2473 | /**
|
2474 | * Parse microsyntax template expression and return a list of bindings or
|
2475 | * parsing errors in case the given expression is invalid.
|
2476 | *
|
2477 | * For example,
|
2478 | * ```
|
2479 | * <div *ngFor="let item of items">
|
2480 | * ^ ^ absoluteValueOffset for `templateValue`
|
2481 | * absoluteKeyOffset for `templateKey`
|
2482 | * ```
|
2483 | * contains three bindings:
|
2484 | * 1. ngFor -> null
|
2485 | * 2. item -> NgForOfContext.$implicit
|
2486 | * 3. ngForOf -> items
|
2487 | *
|
2488 | * This is apparent from the de-sugared template:
|
2489 | * ```
|
2490 | * <ng-template ngFor let-item [ngForOf]="items">
|
2491 | * ```
|
2492 | *
|
2493 | * @param templateKey name of directive, without the * prefix. For example: ngIf, ngFor
|
2494 | * @param templateValue RHS of the microsyntax attribute
|
2495 | * @param templateUrl template filename if it's external, component filename if it's inline
|
2496 | * @param absoluteKeyOffset start of the `templateKey`
|
2497 | * @param absoluteValueOffset start of the `templateValue`
|
2498 | */
|
2499 | parseTemplateBindings(templateKey: string, templateValue: string, templateUrl: string, absoluteKeyOffset: number, absoluteValueOffset: number): TemplateBindingParseResult;
|
2500 | parseInterpolation(input: string, location: string, absoluteOffset: number, interpolatedTokens: InterpolatedAttributeToken[] | InterpolatedTextToken[] | null, interpolationConfig?: InterpolationConfig): ASTWithSource | null;
|
2501 | /**
|
2502 | * Similar to `parseInterpolation`, but treats the provided string as a single expression
|
2503 | * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).
|
2504 | * This is used for parsing the switch expression in ICUs.
|
2505 | */
|
2506 | parseInterpolationExpression(expression: string, location: string, absoluteOffset: number): ASTWithSource;
|
2507 | private createInterpolationAst;
|
2508 | /**
|
2509 | * Splits a string of text into "raw" text segments and expressions present in interpolations in
|
2510 | * the string.
|
2511 | * Returns `null` if there are no interpolations, otherwise a
|
2512 | * `SplitInterpolation` with splits that look like
|
2513 | * <raw text> <expression> <raw text> ... <raw text> <expression> <raw text>
|
2514 | */
|
2515 | splitInterpolation(input: string, location: string, interpolatedTokens: InterpolatedAttributeToken[] | InterpolatedTextToken[] | null, interpolationConfig?: InterpolationConfig): SplitInterpolation;
|
2516 | wrapLiteralPrimitive(input: string | null, location: string, absoluteOffset: number): ASTWithSource;
|
2517 | private _stripComments;
|
2518 | private _commentStart;
|
2519 | private _checkNoInterpolation;
|
2520 | /**
|
2521 | * Finds the index of the end of an interpolation expression
|
2522 | * while ignoring comments and quoted content.
|
2523 | */
|
2524 | private _getInterpolationEndIndex;
|
2525 | /**
|
2526 | * Generator used to iterate over the character indexes of a string that are outside of quotes.
|
2527 | * @param input String to loop through.
|
2528 | * @param start Index within the string at which to start.
|
2529 | */
|
2530 | private _forEachUnquotedChar;
|
2531 | }
|
2532 |
|
2533 | declare class Parser_2 {
|
2534 | getTagDefinition: (tagName: string) => TagDefinition;
|
2535 | constructor(getTagDefinition: (tagName: string) => TagDefinition);
|
2536 | parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult;
|
2537 | }
|
2538 |
|
2539 | export declare class ParserError {
|
2540 | input: string;
|
2541 | errLocation: string;
|
2542 | ctxLocation?: any;
|
2543 | message: string;
|
2544 | constructor(message: string, input: string, errLocation: string, ctxLocation?: any);
|
2545 | }
|
2546 |
|
2547 | declare function parseSelectorToR3Selector(selector: string | null): R3CssSelectorList;
|
2548 |
|
2549 | export declare class ParseSourceFile {
|
2550 | content: string;
|
2551 | url: string;
|
2552 | constructor(content: string, url: string);
|
2553 | }
|
2554 |
|
2555 | export declare class ParseSourceSpan {
|
2556 | start: ParseLocation;
|
2557 | end: ParseLocation;
|
2558 | fullStart: ParseLocation;
|
2559 | details: string | null;
|
2560 | |
2561 |
|
2562 |
|
2563 |
|
2564 |
|
2565 |
|
2566 |
|
2567 |
|
2568 |
|
2569 |
|
2570 |
|
2571 |
|
2572 |
|
2573 |
|
2574 |
|
2575 |
|
2576 |
|
2577 |
|
2578 |
|
2579 |
|
2580 |
|
2581 |
|
2582 |
|
2583 | constructor(start: ParseLocation, end: ParseLocation, fullStart?: ParseLocation, details?: string | null);
|
2584 | toString(): string;
|
2585 | }
|
2586 |
|
2587 | export declare class ParseSpan {
|
2588 | start: number;
|
2589 | end: number;
|
2590 | constructor(start: number, end: number);
|
2591 | toAbsolute(absoluteOffset: number): AbsoluteSourceSpan;
|
2592 | }
|
2593 |
|
2594 | /**
|
2595 | * Parse a template into render3 `Node`s and additional metadata, with no other dependencies.
|
2596 | *
|
2597 | * @param template text of the template to parse
|
2598 | * @param templateUrl URL to use for source mapping of the parsed template
|
2599 | * @param options options to modify how the template is parsed
|
2600 | */
|
2601 | export declare function parseTemplate(template: string, templateUrl: string, options?: ParseTemplateOptions): ParsedTemplate;
|
2602 |
|
2603 | /**
|
2604 | * Options that can be used to modify how a template is parsed by `parseTemplate()`.
|
2605 | */
|
2606 | export declare interface ParseTemplateOptions {
|
2607 | |
2608 |
|
2609 |
|
2610 | preserveWhitespaces?: boolean;
|
2611 | |
2612 |
|
2613 |
|
2614 | preserveLineEndings?: boolean;
|
2615 | |
2616 |
|
2617 |
|
2618 | preserveSignificantWhitespace?: boolean;
|
2619 | |
2620 |
|
2621 |
|
2622 | interpolationConfig?: InterpolationConfig;
|
2623 | |
2624 |
|
2625 |
|
2626 |
|
2627 | range?: LexerRange;
|
2628 | |
2629 |
|
2630 |
|
2631 |
|
2632 |
|
2633 |
|
2634 |
|
2635 |
|
2636 |
|
2637 |
|
2638 |
|
2639 |
|
2640 |
|
2641 |
|
2642 |
|
2643 |
|
2644 |
|
2645 |
|
2646 |
|
2647 |
|
2648 |
|
2649 |
|
2650 |
|
2651 | escapedString?: boolean;
|
2652 | |
2653 |
|
2654 |
|
2655 |
|
2656 |
|
2657 | leadingTriviaChars?: string[];
|
2658 | |
2659 |
|
2660 |
|
2661 |
|
2662 |
|
2663 |
|
2664 |
|
2665 |
|
2666 | enableI18nLegacyMessageIdFormat?: boolean;
|
2667 | |
2668 |
|
2669 |
|
2670 |
|
2671 |
|
2672 |
|
2673 |
|
2674 |
|
2675 | i18nNormalizeLineEndingsInICUs?: boolean;
|
2676 | |
2677 |
|
2678 |
|
2679 |
|
2680 |
|
2681 |
|
2682 |
|
2683 |
|
2684 |
|
2685 |
|
2686 |
|
2687 |
|
2688 |
|
2689 |
|
2690 | alwaysAttemptHtmlToR3AstConversion?: boolean;
|
2691 | |
2692 |
|
2693 |
|
2694 |
|
2695 |
|
2696 |
|
2697 |
|
2698 |
|
2699 | collectCommentNodes?: boolean;
|
2700 |
|
2701 | enableBlockSyntax?: boolean;
|
2702 |
|
2703 | enableLetSyntax?: boolean;
|
2704 | }
|
2705 |
|
2706 | export declare class ParseTreeResult {
|
2707 | rootNodes: html.Node[];
|
2708 | errors: ParseError[];
|
2709 | constructor(rootNodes: html.Node[], errors: ParseError[]);
|
2710 | }
|
2711 |
|
2712 | declare class Placeholder implements Node_3 {
|
2713 | value: string;
|
2714 | name: string;
|
2715 | sourceSpan: ParseSourceSpan;
|
2716 | constructor(value: string, name: string, sourceSpan: ParseSourceSpan);
|
2717 | visit(visitor: Visitor_2, context?: any): any;
|
2718 | }
|
2719 |
|
2720 | /**
|
2721 | * A `PlaceholderMapper` converts placeholder names from internal to serialized representation and
|
2722 | * back.
|
2723 | *
|
2724 | * It should be used for serialization format that put constraints on the placeholder names.
|
2725 | */
|
2726 | declare interface PlaceholderMapper {
|
2727 | toPublicName(internalName: string): string | null;
|
2728 | toInternalName(publicName: string): string | null;
|
2729 | }
|
2730 |
|
2731 | declare class PlaceholderPiece {
|
2732 | text: string;
|
2733 | sourceSpan: ParseSourceSpan;
|
2734 | associatedMessage?: Message | undefined;
|
2735 | |
2736 |
|
2737 |
|
2738 |
|
2739 |
|
2740 |
|
2741 |
|
2742 |
|
2743 |
|
2744 | constructor(text: string, sourceSpan: ParseSourceSpan, associatedMessage?: Message | undefined);
|
2745 | }
|
2746 |
|
2747 | export declare class PrefixNot extends AST {
|
2748 | expression: AST;
|
2749 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expression: AST);
|
2750 | visit(visitor: AstVisitor, context?: any): any;
|
2751 | }
|
2752 |
|
2753 | export declare function preserveWhitespacesDefault(preserveWhitespacesOption: boolean | null, defaultSetting?: boolean): boolean;
|
2754 |
|
2755 | export declare class PropertyRead extends ASTWithName {
|
2756 | receiver: AST;
|
2757 | name: string;
|
2758 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, nameSpan: AbsoluteSourceSpan, receiver: AST, name: string);
|
2759 | visit(visitor: AstVisitor, context?: any): any;
|
2760 | }
|
2761 |
|
2762 | export declare class PropertyWrite extends ASTWithName {
|
2763 | receiver: AST;
|
2764 | name: string;
|
2765 | value: AST;
|
2766 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, nameSpan: AbsoluteSourceSpan, receiver: AST, name: string, value: AST);
|
2767 | visit(visitor: AstVisitor, context?: any): any;
|
2768 | }
|
2769 |
|
2770 | export declare function publishFacade(global: any): void;
|
2771 |
|
2772 | /**
|
2773 | * Metadata container for a `Target` that allows queries for specific bits of metadata.
|
2774 | *
|
2775 | * See `BoundTarget` for documentation on the individual methods.
|
2776 | */
|
2777 | export declare class R3BoundTarget<DirectiveT extends DirectiveMeta> implements BoundTarget<DirectiveT> {
|
2778 | readonly target: Target;
|
2779 | private directives;
|
2780 | private eagerDirectives;
|
2781 | private bindings;
|
2782 | private references;
|
2783 | private exprTargets;
|
2784 | private symbols;
|
2785 | private nestingLevel;
|
2786 | private scopedNodeEntities;
|
2787 | private usedPipes;
|
2788 | private eagerPipes;
|
2789 |
|
2790 | private deferredBlocks;
|
2791 |
|
2792 | private deferredScopes;
|
2793 | constructor(target: Target, directives: Map<TmplAstElement | TmplAstTemplate, DirectiveT[]>, eagerDirectives: DirectiveT[], bindings: Map<TmplAstBoundAttribute | TmplAstBoundEvent | TmplAstTextAttribute, DirectiveT | TmplAstElement | TmplAstTemplate>, references: Map<TmplAstBoundAttribute | TmplAstBoundEvent | TmplAstReference | TmplAstTextAttribute, {
|
2794 | directive: DirectiveT;
|
2795 | node: TmplAstElement | TmplAstTemplate;
|
2796 | } | TmplAstElement | TmplAstTemplate>, exprTargets: Map<AST, TemplateEntity>, symbols: Map<TemplateEntity, TmplAstTemplate>, nestingLevel: Map<ScopedNode, number>, scopedNodeEntities: Map<ScopedNode | null, ReadonlySet<TemplateEntity>>, usedPipes: Set<string>, eagerPipes: Set<string>, rawDeferred: [TmplAstDeferredBlock, Scope][]);
|
2797 | getEntitiesInScope(node: ScopedNode | null): ReadonlySet<TemplateEntity>;
|
2798 | getDirectivesOfNode(node: TmplAstElement | TmplAstTemplate): DirectiveT[] | null;
|
2799 | getReferenceTarget(ref: TmplAstReference): ReferenceTarget<DirectiveT> | null;
|
2800 | getConsumerOfBinding(binding: TmplAstBoundAttribute | TmplAstBoundEvent | TmplAstTextAttribute): DirectiveT | TmplAstElement | TmplAstTemplate | null;
|
2801 | getExpressionTarget(expr: AST): TemplateEntity | null;
|
2802 | getDefinitionNodeOfSymbol(symbol: TemplateEntity): ScopedNode | null;
|
2803 | getNestingLevel(node: ScopedNode): number;
|
2804 | getUsedDirectives(): DirectiveT[];
|
2805 | getEagerlyUsedDirectives(): DirectiveT[];
|
2806 | getUsedPipes(): string[];
|
2807 | getEagerlyUsedPipes(): string[];
|
2808 | getDeferBlocks(): TmplAstDeferredBlock[];
|
2809 | getDeferredTriggerTarget(block: TmplAstDeferredBlock, trigger: TmplAstDeferredTrigger): TmplAstElement | null;
|
2810 | isDeferred(element: TmplAstElement): boolean;
|
2811 | /**
|
2812 | * Finds an entity with a specific name in a scope.
|
2813 | * @param rootNode Root node of the scope.
|
2814 | * @param name Name of the entity.
|
2815 | */
|
2816 | private findEntityInScope;
|
2817 | /** Coerces a `ReferenceTarget` to an `Element`, if possible. */
|
2818 | private referenceTargetToElement;
|
2819 | }
|
2820 |
|
2821 | /**
|
2822 | * Info needed for runtime errors related to a class, such as the location in which the class is
|
2823 | * defined.
|
2824 | */
|
2825 | export declare interface R3ClassDebugInfo {
|
2826 |
|
2827 | type: outputAst.Expression;
|
2828 | |
2829 |
|
2830 |
|
2831 | className: outputAst.Expression;
|
2832 | |
2833 |
|
2834 |
|
2835 |
|
2836 |
|
2837 |
|
2838 |
|
2839 |
|
2840 |
|
2841 |
|
2842 | filePath: outputAst.Expression | null;
|
2843 | |
2844 |
|
2845 |
|
2846 | lineNumber: outputAst.Expression;
|
2847 | |
2848 |
|
2849 |
|
2850 |
|
2851 | forbidOrphanRendering: boolean;
|
2852 | }
|
2853 |
|
2854 |
|
2855 |
|
2856 |
|
2857 |
|
2858 |
|
2859 | export declare interface R3ClassMetadata {
|
2860 | |
2861 |
|
2862 |
|
2863 | type: outputAst.Expression;
|
2864 | |
2865 |
|
2866 |
|
2867 | decorators: outputAst.Expression;
|
2868 | |
2869 |
|
2870 |
|
2871 |
|
2872 | ctorParameters: outputAst.Expression | null;
|
2873 | |
2874 |
|
2875 |
|
2876 |
|
2877 | propDecorators: outputAst.Expression | null;
|
2878 | }
|
2879 |
|
2880 |
|
2881 |
|
2882 |
|
2883 | export declare interface R3CompiledExpression {
|
2884 | expression: outputAst.Expression;
|
2885 | type: outputAst.Type;
|
2886 | statements: outputAst.Statement[];
|
2887 | }
|
2888 |
|
2889 |
|
2890 |
|
2891 |
|
2892 | export declare type R3ComponentDeferMetadata = {
|
2893 | mode: DeferBlockDepsEmitMode.PerBlock;
|
2894 | blocks: Map<t.DeferredBlock, outputAst.Expression | null>;
|
2895 | } | {
|
2896 | mode: DeferBlockDepsEmitMode.PerComponent;
|
2897 | dependenciesFn: outputAst.Expression | null;
|
2898 | };
|
2899 |
|
2900 |
|
2901 |
|
2902 |
|
2903 | export declare interface R3ComponentMetadata<DeclarationT extends R3TemplateDependency> extends R3DirectiveMetadata {
|
2904 | |
2905 |
|
2906 |
|
2907 | template: {
|
2908 | |
2909 |
|
2910 |
|
2911 | nodes: t.Node[];
|
2912 | |
2913 |
|
2914 |
|
2915 |
|
2916 | ngContentSelectors: string[];
|
2917 | |
2918 |
|
2919 |
|
2920 | preserveWhitespaces?: boolean;
|
2921 | };
|
2922 | declarations: DeclarationT[];
|
2923 |
|
2924 | defer: R3ComponentDeferMetadata;
|
2925 | |
2926 |
|
2927 |
|
2928 | declarationListEmitMode: DeclarationListEmitMode;
|
2929 | |
2930 |
|
2931 |
|
2932 | styles: string[];
|
2933 | |
2934 |
|
2935 |
|
2936 | externalStyles?: string[];
|
2937 | |
2938 |
|
2939 |
|
2940 |
|
2941 |
|
2942 |
|
2943 |
|
2944 |
|
2945 | encapsulation: ViewEncapsulation;
|
2946 | |
2947 |
|
2948 |
|
2949 | animations: outputAst.Expression | null;
|
2950 | |
2951 |
|
2952 |
|
2953 | viewProviders: outputAst.Expression | null;
|
2954 | |
2955 |
|
2956 |
|
2957 |
|
2958 |
|
2959 | relativeContextFilePath: string;
|
2960 | |
2961 |
|
2962 |
|
2963 |
|
2964 | i18nUseExternalIds: boolean;
|
2965 | |
2966 |
|
2967 |
|
2968 | interpolation: InterpolationConfig;
|
2969 | |
2970 |
|
2971 |
|
2972 |
|
2973 |
|
2974 |
|
2975 |
|
2976 | changeDetection: ChangeDetectionStrategy | outputAst.Expression | null;
|
2977 | |
2978 |
|
2979 |
|
2980 |
|
2981 |
|
2982 | rawImports?: outputAst.Expression;
|
2983 | }
|
2984 |
|
2985 |
|
2986 |
|
2987 |
|
2988 | declare interface R3ConstructorFactoryMetadata {
|
2989 | |
2990 |
|
2991 |
|
2992 | name: string;
|
2993 | |
2994 |
|
2995 |
|
2996 | type: R3Reference;
|
2997 |
|
2998 | typeArgumentCount: number;
|
2999 | |
3000 |
|
3001 |
|
3002 |
|
3003 |
|
3004 |
|
3005 |
|
3006 |
|
3007 | deps: R3DependencyMetadata[] | 'invalid' | null;
|
3008 | |
3009 |
|
3010 |
|
3011 | target: FactoryTarget;
|
3012 | }
|
3013 |
|
3014 | declare type R3CssSelector = (string | SelectorFlags)[];
|
3015 |
|
3016 | declare type R3CssSelectorList = R3CssSelector[];
|
3017 |
|
3018 |
|
3019 |
|
3020 |
|
3021 |
|
3022 |
|
3023 |
|
3024 | export declare interface R3DeclareClassMetadata extends R3PartialDeclaration {
|
3025 | |
3026 |
|
3027 |
|
3028 | decorators: outputAst.Expression;
|
3029 | |
3030 |
|
3031 |
|
3032 |
|
3033 | ctorParameters?: outputAst.Expression;
|
3034 | |
3035 |
|
3036 |
|
3037 |
|
3038 | propDecorators?: outputAst.Expression;
|
3039 | }
|
3040 |
|
3041 |
|
3042 |
|
3043 |
|
3044 |
|
3045 |
|
3046 |
|
3047 | export declare interface R3DeclareClassMetadataAsync extends R3PartialDeclaration {
|
3048 |
|
3049 | resolveDeferredDeps: outputAst.Expression;
|
3050 | |
3051 |
|
3052 |
|
3053 |
|
3054 | resolveMetadata: outputAst.Expression;
|
3055 | }
|
3056 |
|
3057 |
|
3058 |
|
3059 |
|
3060 | export declare interface R3DeclareComponentMetadata extends R3DeclareDirectiveMetadata {
|
3061 | |
3062 |
|
3063 |
|
3064 |
|
3065 |
|
3066 |
|
3067 | template: outputAst.Expression;
|
3068 | |
3069 |
|
3070 |
|
3071 |
|
3072 | isInline?: boolean;
|
3073 | |
3074 |
|
3075 |
|
3076 | styles?: string[];
|
3077 | |
3078 |
|
3079 |
|
3080 |
|
3081 |
|
3082 |
|
3083 | components?: R3DeclareDirectiveDependencyMetadata[];
|
3084 | |
3085 |
|
3086 |
|
3087 |
|
3088 |
|
3089 |
|
3090 | directives?: R3DeclareDirectiveDependencyMetadata[];
|
3091 | |
3092 |
|
3093 |
|
3094 |
|
3095 |
|
3096 |
|
3097 | dependencies?: R3DeclareTemplateDependencyMetadata[];
|
3098 | |
3099 |
|
3100 |
|
3101 |
|
3102 | deferBlockDependencies?: outputAst.Expression[];
|
3103 | |
3104 |
|
3105 |
|
3106 |
|
3107 | pipes?: {
|
3108 | [pipeName: string]: outputAst.Expression | (() => outputAst.Expression);
|
3109 | };
|
3110 | /**
|
3111 | * The list of view providers defined in the component.
|
3112 | */
|
3113 | viewProviders?: outputAst.Expression;
|
3114 | /**
|
3115 | * A collection of animation triggers that will be used in the component template.
|
3116 | */
|
3117 | animations?: outputAst.Expression;
|
3118 | /**
|
3119 | * Strategy used for detecting changes in the component.
|
3120 | * Defaults to `ChangeDetectionStrategy.Default`.
|
3121 | */
|
3122 | changeDetection?: ChangeDetectionStrategy;
|
3123 | /**
|
3124 | * An encapsulation policy for the component's styling.
|
3125 | * Defaults to `ViewEncapsulation.Emulated`.
|
3126 | */
|
3127 | encapsulation?: ViewEncapsulation;
|
3128 | /**
|
3129 | * Overrides the default interpolation start and end delimiters. Defaults to {{ and }}.
|
3130 | */
|
3131 | interpolation?: [string, string];
|
3132 | /**
|
3133 | * Whether whitespace in the template should be preserved. Defaults to false.
|
3134 | */
|
3135 | preserveWhitespaces?: boolean;
|
3136 | }
|
3137 |
|
3138 | /**
|
3139 | * Metadata indicating how a dependency should be injected into a factory.
|
3140 | */
|
3141 | export declare interface R3DeclareDependencyMetadata {
|
3142 | /**
|
3143 | * An expression representing the token or value to be injected, or `null` if the dependency is
|
3144 | * not valid.
|
3145 | *
|
3146 | * If this dependency is due to the `@Attribute()` decorator, then this is an expression
|
3147 | * evaluating to the name of the attribute.
|
3148 | */
|
3149 | token: outputAst.Expression | null;
|
3150 | /**
|
3151 | * Whether the dependency is injecting an attribute value.
|
3152 | * Default: false.
|
3153 | */
|
3154 | attribute?: boolean;
|
3155 | /**
|
3156 | * Whether the dependency has an @Host qualifier.
|
3157 | * Default: false,
|
3158 | */
|
3159 | host?: boolean;
|
3160 | /**
|
3161 | * Whether the dependency has an @Optional qualifier.
|
3162 | * Default: false,
|
3163 | */
|
3164 | optional?: boolean;
|
3165 | /**
|
3166 | * Whether the dependency has an @Self qualifier.
|
3167 | * Default: false,
|
3168 | */
|
3169 | self?: boolean;
|
3170 | /**
|
3171 | * Whether the dependency has an @SkipSelf qualifier.
|
3172 | * Default: false,
|
3173 | */
|
3174 | skipSelf?: boolean;
|
3175 | }
|
3176 |
|
3177 | export declare interface R3DeclareDirectiveDependencyMetadata {
|
3178 | kind: 'directive' | 'component';
|
3179 | /**
|
3180 | * Selector of the directive.
|
3181 | */
|
3182 | selector: string;
|
3183 | /**
|
3184 | * Reference to the directive class (possibly a forward reference wrapped in a `forwardRef`
|
3185 | * invocation).
|
3186 | */
|
3187 | type: outputAst.Expression | (() => outputAst.Expression);
|
3188 | /**
|
3189 | * Property names of the directive's inputs.
|
3190 | */
|
3191 | inputs?: string[];
|
3192 | /**
|
3193 | * Event names of the directive's outputs.
|
3194 | */
|
3195 | outputs?: string[];
|
3196 | /**
|
3197 | * Names by which this directive exports itself for references.
|
3198 | */
|
3199 | exportAs?: string[];
|
3200 | }
|
3201 |
|
3202 | /**
|
3203 | * Describes the shape of the object that the `ɵɵngDeclareDirective()` function accepts.
|
3204 | */
|
3205 | export declare interface R3DeclareDirectiveMetadata extends R3PartialDeclaration {
|
3206 | /**
|
3207 | * Unparsed selector of the directive.
|
3208 | */
|
3209 | selector?: string;
|
3210 | /**
|
3211 | * A mapping of inputs from class property names to binding property names, or to a tuple of
|
3212 | * binding property name and class property name if the names are different.
|
3213 | */
|
3214 | inputs?: {
|
3215 | [fieldName: string]: {
|
3216 | classPropertyName: string;
|
3217 | publicName: string;
|
3218 | isSignal: boolean;
|
3219 | isRequired: boolean;
|
3220 | transformFunction: outputAst.Expression | null;
|
3221 | } | LegacyInputPartialMapping;
|
3222 | };
|
3223 | /**
|
3224 | * A mapping of outputs from class property names to binding property names.
|
3225 | */
|
3226 | outputs?: {
|
3227 | [classPropertyName: string]: string;
|
3228 | };
|
3229 | /**
|
3230 | * Information about host bindings present on the component.
|
3231 | */
|
3232 | host?: {
|
3233 | /**
|
3234 | * A mapping of attribute names to their value expression.
|
3235 | */
|
3236 | attributes?: {
|
3237 | [key: string]: outputAst.Expression;
|
3238 | };
|
3239 | /**
|
3240 | * A mapping of event names to their unparsed event handler expression.
|
3241 | */
|
3242 | listeners: {
|
3243 | [key: string]: string;
|
3244 | };
|
3245 | /**
|
3246 | * A mapping of bound properties to their unparsed binding expression.
|
3247 | */
|
3248 | properties?: {
|
3249 | [key: string]: string;
|
3250 | };
|
3251 | /**
|
3252 | * The value of the class attribute, if present. This is stored outside of `attributes` as its
|
3253 | * string value must be known statically.
|
3254 | */
|
3255 | classAttribute?: string;
|
3256 | /**
|
3257 | * The value of the style attribute, if present. This is stored outside of `attributes` as its
|
3258 | * string value must be known statically.
|
3259 | */
|
3260 | styleAttribute?: string;
|
3261 | };
|
3262 | /**
|
3263 | * Information about the content queries made by the directive.
|
3264 | */
|
3265 | queries?: R3DeclareQueryMetadata[];
|
3266 | /**
|
3267 | * Information about the view queries made by the directive.
|
3268 | */
|
3269 | viewQueries?: R3DeclareQueryMetadata[];
|
3270 | /**
|
3271 | * The list of providers provided by the directive.
|
3272 | */
|
3273 | providers?: outputAst.Expression;
|
3274 | /**
|
3275 | * The names by which the directive is exported.
|
3276 | */
|
3277 | exportAs?: string[];
|
3278 | /**
|
3279 | * Whether the directive has an inheritance clause. Defaults to false.
|
3280 | */
|
3281 | usesInheritance?: boolean;
|
3282 | /**
|
3283 | * Whether the directive implements the `ngOnChanges` hook. Defaults to false.
|
3284 | */
|
3285 | usesOnChanges?: boolean;
|
3286 | /**
|
3287 | * Whether the directive is standalone. Defaults to false.
|
3288 | */
|
3289 | isStandalone?: boolean;
|
3290 | /**
|
3291 | * Whether the directive is a signal-based directive. Defaults to false.
|
3292 | */
|
3293 | isSignal?: boolean;
|
3294 | /**
|
3295 | * Additional directives applied to the directive host.
|
3296 | */
|
3297 | hostDirectives?: R3DeclareHostDirectiveMetadata[];
|
3298 | }
|
3299 |
|
3300 | /**
|
3301 | * Describes the shape of the object that the `ɵɵngDeclareFactory()` function accepts.
|
3302 | *
|
3303 | * This interface serves primarily as documentation, as conformance to this interface is not
|
3304 | * enforced during linking.
|
3305 | */
|
3306 | export declare interface R3DeclareFactoryMetadata extends R3PartialDeclaration {
|
3307 | /**
|
3308 | * A collection of dependencies that this factory relies upon.
|
3309 | *
|
3310 | * If this is `null`, then the type's constructor is nonexistent and will be inherited from an
|
3311 | * ancestor of the type.
|
3312 | *
|
3313 | * If this is `'invalid'`, then one or more of the parameters wasn't resolvable and any attempt to
|
3314 | * use these deps will result in a runtime error.
|
3315 | */
|
3316 | deps: R3DeclareDependencyMetadata[] | 'invalid' | null;
|
3317 | /**
|
3318 | * Type of the target being created by the factory.
|
3319 | */
|
3320 | target: FactoryTarget_2;
|
3321 | }
|
3322 |
|
3323 | /**
|
3324 | * Describes the shape of the object literal that can be
|
3325 | * passed in as a part of the `hostDirectives` array.
|
3326 | */
|
3327 | export declare interface R3DeclareHostDirectiveMetadata {
|
3328 | directive: outputAst.Expression;
|
3329 | inputs?: string[];
|
3330 | outputs?: string[];
|
3331 | }
|
3332 |
|
3333 | /**
|
3334 | * Describes the shape of the object that the `ɵɵngDeclareInjectable()` function accepts.
|
3335 | *
|
3336 | * This interface serves primarily as documentation, as conformance to this interface is not
|
3337 | * enforced during linking.
|
3338 | */
|
3339 | export declare interface R3DeclareInjectableMetadata extends R3PartialDeclaration {
|
3340 | /**
|
3341 | * If provided, specifies that the declared injectable belongs to a particular injector:
|
3342 | * - `InjectorType` such as `NgModule`,
|
3343 | * - `'root'` the root injector
|
3344 | * - `'any'` all injectors.
|
3345 | * If not provided, then it does not belong to any injector. Must be explicitly listed in the
|
3346 | * providers of an injector.
|
3347 | */
|
3348 | providedIn?: outputAst.Expression;
|
3349 | /**
|
3350 | * If provided, an expression that evaluates to a class to use when creating an instance of this
|
3351 | * injectable.
|
3352 | */
|
3353 | useClass?: outputAst.Expression;
|
3354 | /**
|
3355 | * If provided, an expression that evaluates to a function to use when creating an instance of
|
3356 | * this injectable.
|
3357 | */
|
3358 | useFactory?: outputAst.Expression;
|
3359 | /**
|
3360 | * If provided, an expression that evaluates to a token of another injectable that this injectable
|
3361 | * aliases.
|
3362 | */
|
3363 | useExisting?: outputAst.Expression;
|
3364 | /**
|
3365 | * If provided, an expression that evaluates to the value of the instance of this injectable.
|
3366 | */
|
3367 | useValue?: outputAst.Expression;
|
3368 | /**
|
3369 | * An array of dependencies to support instantiating this injectable via `useClass` or
|
3370 | * `useFactory`.
|
3371 | */
|
3372 | deps?: R3DeclareDependencyMetadata[];
|
3373 | }
|
3374 |
|
3375 | /**
|
3376 | * Describes the shape of the objects that the `ɵɵngDeclareInjector()` accepts.
|
3377 | */
|
3378 | export declare interface R3DeclareInjectorMetadata extends R3PartialDeclaration {
|
3379 | /**
|
3380 | * The list of providers provided by the injector.
|
3381 | */
|
3382 | providers?: outputAst.Expression;
|
3383 | /**
|
3384 | * The list of imports into the injector.
|
3385 | */
|
3386 | imports?: outputAst.Expression[];
|
3387 | }
|
3388 |
|
3389 | export declare interface R3DeclareNgModuleDependencyMetadata {
|
3390 | kind: 'ngmodule';
|
3391 | type: outputAst.Expression | (() => outputAst.Expression);
|
3392 | }
|
3393 |
|
3394 | /**
|
3395 | * Describes the shape of the objects that the `ɵɵngDeclareNgModule()` accepts.
|
3396 | */
|
3397 | export declare interface R3DeclareNgModuleMetadata extends R3PartialDeclaration {
|
3398 | /**
|
3399 | * An array of expressions representing the bootstrap components specified by the module.
|
3400 | */
|
3401 | bootstrap?: outputAst.Expression[];
|
3402 | /**
|
3403 | * An array of expressions representing the directives and pipes declared by the module.
|
3404 | */
|
3405 | declarations?: outputAst.Expression[];
|
3406 | /**
|
3407 | * An array of expressions representing the imports of the module.
|
3408 | */
|
3409 | imports?: outputAst.Expression[];
|
3410 | /**
|
3411 | * An array of expressions representing the exports of the module.
|
3412 | */
|
3413 | exports?: outputAst.Expression[];
|
3414 | /**
|
3415 | * The set of schemas that declare elements to be allowed in the NgModule.
|
3416 | */
|
3417 | schemas?: outputAst.Expression[];
|
3418 | /** Unique ID or expression representing the unique ID of an NgModule. */
|
3419 | id?: outputAst.Expression;
|
3420 | }
|
3421 |
|
3422 | export declare interface R3DeclarePipeDependencyMetadata {
|
3423 | kind: 'pipe';
|
3424 | name: string;
|
3425 | /**
|
3426 | * Reference to the pipe class (possibly a forward reference wrapped in a `forwardRef`
|
3427 | * invocation).
|
3428 | */
|
3429 | type: outputAst.Expression | (() => outputAst.Expression);
|
3430 | }
|
3431 |
|
3432 | /**
|
3433 | * Describes the shape of the object that the `ɵɵngDeclarePipe()` function accepts.
|
3434 | *
|
3435 | * This interface serves primarily as documentation, as conformance to this interface is not
|
3436 | * enforced during linking.
|
3437 | */
|
3438 | export declare interface R3DeclarePipeMetadata extends R3PartialDeclaration {
|
3439 | /**
|
3440 | * The name to use in templates to refer to this pipe.
|
3441 | */
|
3442 | name: string;
|
3443 | /**
|
3444 | * Whether this pipe is "pure".
|
3445 | *
|
3446 | * A pure pipe's `transform()` method is only invoked when its input arguments change.
|
3447 | *
|
3448 | * Default: true.
|
3449 | */
|
3450 | pure?: boolean;
|
3451 | /**
|
3452 | * Whether the pipe is standalone.
|
3453 | *
|
3454 | * Default: false.
|
3455 | */
|
3456 | isStandalone?: boolean;
|
3457 | }
|
3458 |
|
3459 | export declare interface R3DeclareQueryMetadata {
|
3460 | /**
|
3461 | * Name of the property on the class to update with query results.
|
3462 | */
|
3463 | propertyName: string;
|
3464 | /**
|
3465 | * Whether to read only the first matching result, or an array of results. Defaults to false.
|
3466 | */
|
3467 | first?: boolean;
|
3468 | /**
|
3469 | * Either an expression representing a type (possibly wrapped in a `forwardRef()`) or
|
3470 | * `InjectionToken` for the query predicate, or a set of string selectors.
|
3471 | */
|
3472 | predicate: outputAst.Expression | string[];
|
3473 | /**
|
3474 | * Whether to include only direct children or all descendants. Defaults to false.
|
3475 | */
|
3476 | descendants?: boolean;
|
3477 | /**
|
3478 | * True to only fire changes if there are underlying changes to the query.
|
3479 | */
|
3480 | emitDistinctChangesOnly?: boolean;
|
3481 | /**
|
3482 | * An expression representing a type to read from each matched node, or null if the default value
|
3483 | * for a given node is to be returned.
|
3484 | */
|
3485 | read?: outputAst.Expression;
|
3486 | /**
|
3487 | * Whether or not this query should collect only static results. Defaults to false.
|
3488 | *
|
3489 | * If static is true, the query's results will be set on the component after nodes are created,
|
3490 | * but before change detection runs. This means that any results that relied upon change detection
|
3491 | * to run (e.g. results inside *ngIf or *ngFor views) will not be collected. Query results are
|
3492 | * available in the ngOnInit hook.
|
3493 | *
|
3494 | * If static is false, the query's results will be set on the component after change detection
|
3495 | * runs. This means that the query results can contain nodes inside *ngIf or *ngFor views, but
|
3496 | * the results will not be available in the ngOnInit hook (only in the ngAfterContentInit for
|
3497 | * content hooks and ngAfterViewInit for view hooks).
|
3498 | */
|
3499 | static?: boolean;
|
3500 | /** Whether the query is signal-based. */
|
3501 | isSignal: boolean;
|
3502 | }
|
3503 |
|
3504 | export declare type R3DeclareTemplateDependencyMetadata = R3DeclareDirectiveDependencyMetadata | R3DeclarePipeDependencyMetadata | R3DeclareNgModuleDependencyMetadata;
|
3505 |
|
3506 | /**
|
3507 | * Information about a single dependency of a defer block in `PerBlock` mode.
|
3508 | */
|
3509 | export declare interface R3DeferPerBlockDependency {
|
3510 | /**
|
3511 | * Reference to a dependency.
|
3512 | */
|
3513 | typeReference: outputAst.Expression;
|
3514 | /**
|
3515 | * Dependency class name.
|
3516 | */
|
3517 | symbolName: string;
|
3518 | /**
|
3519 | * Whether this dependency can be defer-loaded.
|
3520 | */
|
3521 | isDeferrable: boolean;
|
3522 | /**
|
3523 | * Import path where this dependency is located.
|
3524 | */
|
3525 | importPath: string | null;
|
3526 | /**
|
3527 | * Whether the symbol is the default export.
|
3528 | */
|
3529 | isDefaultImport: boolean;
|
3530 | }
|
3531 |
|
3532 | /**
|
3533 | * Information about a single dependency of a defer block in `PerComponent` mode.
|
3534 | */
|
3535 | export declare interface R3DeferPerComponentDependency {
|
3536 | /**
|
3537 | * Dependency class name.
|
3538 | */
|
3539 | symbolName: string;
|
3540 | /**
|
3541 | * Import path where this dependency is located.
|
3542 | */
|
3543 | importPath: string;
|
3544 | /**
|
3545 | * Whether the symbol is the default export.
|
3546 | */
|
3547 | isDefaultImport: boolean;
|
3548 | }
|
3549 |
|
3550 | /**
|
3551 | * Information needed to compile the defer block resolver function.
|
3552 | */
|
3553 | export declare type R3DeferResolverFunctionMetadata = {
|
3554 | mode: DeferBlockDepsEmitMode.PerBlock;
|
3555 | dependencies: R3DeferPerBlockDependency[];
|
3556 | } | {
|
3557 | mode: DeferBlockDepsEmitMode.PerComponent;
|
3558 | dependencies: R3DeferPerComponentDependency[];
|
3559 | };
|
3560 |
|
3561 | declare interface R3DelegatedFnOrClassMetadata extends R3ConstructorFactoryMetadata {
|
3562 | delegate: outputAst.Expression;
|
3563 | delegateType: R3FactoryDelegateType;
|
3564 | delegateDeps: R3DependencyMetadata[];
|
3565 | }
|
3566 |
|
3567 | export declare interface R3DependencyMetadata {
|
3568 | /**
|
3569 | * An expression representing the token or value to be injected.
|
3570 | * Or `null` if the dependency could not be resolved - making it invalid.
|
3571 | */
|
3572 | token: outputAst.Expression | null;
|
3573 | /**
|
3574 | * If an @Attribute decorator is present, this is the literal type of the attribute name, or
|
3575 | * the unknown type if no literal type is available (e.g. the attribute name is an expression).
|
3576 | * Otherwise it is null;
|
3577 | */
|
3578 | attributeNameType: outputAst.Expression | null;
|
3579 | /**
|
3580 | * Whether the dependency has an @Host qualifier.
|
3581 | */
|
3582 | host: boolean;
|
3583 | /**
|
3584 | * Whether the dependency has an @Optional qualifier.
|
3585 | */
|
3586 | optional: boolean;
|
3587 | /**
|
3588 | * Whether the dependency has an @Self qualifier.
|
3589 | */
|
3590 | self: boolean;
|
3591 | /**
|
3592 | * Whether the dependency has an @SkipSelf qualifier.
|
3593 | */
|
3594 | skipSelf: boolean;
|
3595 | }
|
3596 |
|
3597 | /**
|
3598 | * Information about a directive that is used in a component template. Only the stable, public
|
3599 | * facing information of the directive is stored here.
|
3600 | */
|
3601 | export declare interface R3DirectiveDependencyMetadata extends R3TemplateDependency {
|
3602 | kind: R3TemplateDependencyKind.Directive;
|
3603 | /**
|
3604 | * The selector of the directive.
|
3605 | */
|
3606 | selector: string;
|
3607 | /**
|
3608 | * The binding property names of the inputs of the directive.
|
3609 | */
|
3610 | inputs: string[];
|
3611 | /**
|
3612 | * The binding property names of the outputs of the directive.
|
3613 | */
|
3614 | outputs: string[];
|
3615 | /**
|
3616 | * Name under which the directive is exported, if any (exportAs in Angular). Null otherwise.
|
3617 | */
|
3618 | exportAs: string[] | null;
|
3619 | /**
|
3620 | * If true then this directive is actually a component; otherwise it is not.
|
3621 | */
|
3622 | isComponent: boolean;
|
3623 | }
|
3624 |
|
3625 | /**
|
3626 | * Information needed to compile a directive for the render3 runtime.
|
3627 | */
|
3628 | export declare interface R3DirectiveMetadata {
|
3629 | /**
|
3630 | * Name of the directive type.
|
3631 | */
|
3632 | name: string;
|
3633 | /**
|
3634 | * An expression representing a reference to the directive itself.
|
3635 | */
|
3636 | type: R3Reference;
|
3637 | /**
|
3638 | * Number of generic type parameters of the type itself.
|
3639 | */
|
3640 | typeArgumentCount: number;
|
3641 | /**
|
3642 | * A source span for the directive type.
|
3643 | */
|
3644 | typeSourceSpan: ParseSourceSpan;
|
3645 | /**
|
3646 | * Dependencies of the directive's constructor.
|
3647 | */
|
3648 | deps: R3DependencyMetadata[] | 'invalid' | null;
|
3649 | /**
|
3650 | * Unparsed selector of the directive, or `null` if there was no selector.
|
3651 | */
|
3652 | selector: string | null;
|
3653 | /**
|
3654 | * Information about the content queries made by the directive.
|
3655 | */
|
3656 | queries: R3QueryMetadata[];
|
3657 | /**
|
3658 | * Information about the view queries made by the directive.
|
3659 | */
|
3660 | viewQueries: R3QueryMetadata[];
|
3661 | /**
|
3662 | * Mappings indicating how the directive interacts with its host element (host bindings,
|
3663 | * listeners, etc).
|
3664 | */
|
3665 | host: R3HostMetadata;
|
3666 | /**
|
3667 | * Information about usage of specific lifecycle events which require special treatment in the
|
3668 | * code generator.
|
3669 | */
|
3670 | lifecycle: {
|
3671 | /**
|
3672 | * Whether the directive uses NgOnChanges.
|
3673 | */
|
3674 | usesOnChanges: boolean;
|
3675 | };
|
3676 | /**
|
3677 | * A mapping of inputs from class property names to binding property names, or to a tuple of
|
3678 | * binding property name and class property name if the names are different.
|
3679 | */
|
3680 | inputs: {
|
3681 | [field: string]: R3InputMetadata;
|
3682 | };
|
3683 | /**
|
3684 | * A mapping of outputs from class property names to binding property names, or to a tuple of
|
3685 | * binding property name and class property name if the names are different.
|
3686 | */
|
3687 | outputs: {
|
3688 | [field: string]: string;
|
3689 | };
|
3690 | /**
|
3691 | * Whether or not the component or directive inherits from another class
|
3692 | */
|
3693 | usesInheritance: boolean;
|
3694 | /**
|
3695 | * Whether or not the component or directive inherits its entire decorator from its base class.
|
3696 | */
|
3697 | fullInheritance: boolean;
|
3698 | /**
|
3699 | * Reference name under which to export the directive's type in a template,
|
3700 | * if any.
|
3701 | */
|
3702 | exportAs: string[] | null;
|
3703 | /**
|
3704 | * The list of providers defined in the directive.
|
3705 | */
|
3706 | providers: outputAst.Expression | null;
|
3707 | /**
|
3708 | * Whether or not the component or directive is standalone.
|
3709 | */
|
3710 | isStandalone: boolean;
|
3711 | /**
|
3712 | * Whether or not the component or directive is signal-based.
|
3713 | */
|
3714 | isSignal: boolean;
|
3715 | /**
|
3716 | * Additional directives applied to the directive host.
|
3717 | */
|
3718 | hostDirectives: R3HostDirectiveMetadata[] | null;
|
3719 | }
|
3720 |
|
3721 | declare interface R3ExpressionFactoryMetadata extends R3ConstructorFactoryMetadata {
|
3722 | expression: outputAst.Expression;
|
3723 | }
|
3724 |
|
3725 | declare enum R3FactoryDelegateType {
|
3726 | Class = 0,
|
3727 | Function = 1
|
3728 | }
|
3729 |
|
3730 | export declare type R3FactoryMetadata = R3ConstructorFactoryMetadata | R3DelegatedFnOrClassMetadata | R3ExpressionFactoryMetadata;
|
3731 |
|
3732 | /** Metadata necessary to compile HMR-related code call. */
|
3733 | export declare interface R3HmrMetadata {
|
3734 | /** Component class for which HMR is being enabled. */
|
3735 | type: outputAst.Expression;
|
3736 | /** Name of the component class. */
|
3737 | className: string;
|
3738 | /** File path of the component class. */
|
3739 | filePath: string;
|
3740 | /**
|
3741 | * When the compiler generates new imports, they get produced as namespace imports
|
3742 | * (e.g. import * as i0 from '@angular/core'). These namespaces have to be captured and passed
|
3743 | * along to the update callback.
|
3744 | */
|
3745 | namespaceDependencies: R3HmrNamespaceDependency[];
|
3746 | /**
|
3747 | * HMR update functions cannot contain imports so any locals the generated code depends on
|
3748 | * (e.g. references to imports within the same file or imported symbols) have to be passed in
|
3749 | * as function parameters. This array contains the names of those local symbols.
|
3750 | */
|
3751 | localDependencies: string[];
|
3752 | }
|
3753 |
|
3754 | /** HMR dependency on a namespace import. */
|
3755 | export declare interface R3HmrNamespaceDependency {
|
3756 | /** Module name of the import. */
|
3757 | moduleName: string;
|
3758 | /**
|
3759 | * Name under which to refer to the namespace inside
|
3760 | * HMR-related code. Must be a valid JS identifier.
|
3761 | */
|
3762 | assignedName: string;
|
3763 | }
|
3764 |
|
3765 | /**
|
3766 | * Information needed to compile a host directive for the render3 runtime.
|
3767 | */
|
3768 | export declare interface R3HostDirectiveMetadata {
|
3769 | /** An expression representing the host directive class itself. */
|
3770 | directive: R3Reference;
|
3771 | /** Whether the expression referring to the host directive is a forward reference. */
|
3772 | isForwardReference: boolean;
|
3773 | /** Inputs from the host directive that will be exposed on the host. */
|
3774 | inputs: {
|
3775 | [publicName: string]: string;
|
3776 | } | null;
|
3777 | /** Outputs from the host directive that will be exposed on the host. */
|
3778 | outputs: {
|
3779 | [publicName: string]: string;
|
3780 | } | null;
|
3781 | }
|
3782 |
|
3783 | /**
|
3784 | * Mappings indicating how the class interacts with its
|
3785 | * host element (host bindings, listeners, etc).
|
3786 | */
|
3787 | export declare interface R3HostMetadata {
|
3788 | /**
|
3789 | * A mapping of attribute binding keys to `o.Expression`s.
|
3790 | */
|
3791 | attributes: {
|
3792 | [key: string]: outputAst.Expression;
|
3793 | };
|
3794 | /**
|
3795 | * A mapping of event binding keys to unparsed expressions.
|
3796 | */
|
3797 | listeners: {
|
3798 | [key: string]: string;
|
3799 | };
|
3800 | /**
|
3801 | * A mapping of property binding keys to unparsed expressions.
|
3802 | */
|
3803 | properties: {
|
3804 | [key: string]: string;
|
3805 | };
|
3806 | specialAttributes: {
|
3807 | styleAttr?: string;
|
3808 | classAttr?: string;
|
3809 | };
|
3810 | }
|
3811 |
|
3812 | export declare class R3Identifiers {
|
3813 | static NEW_METHOD: string;
|
3814 | static TRANSFORM_METHOD: string;
|
3815 | static PATCH_DEPS: string;
|
3816 | static core: outputAst.ExternalReference;
|
3817 | static namespaceHTML: outputAst.ExternalReference;
|
3818 | static namespaceMathML: outputAst.ExternalReference;
|
3819 | static namespaceSVG: outputAst.ExternalReference;
|
3820 | static element: outputAst.ExternalReference;
|
3821 | static elementStart: outputAst.ExternalReference;
|
3822 | static elementEnd: outputAst.ExternalReference;
|
3823 | static advance: outputAst.ExternalReference;
|
3824 | static syntheticHostProperty: outputAst.ExternalReference;
|
3825 | static syntheticHostListener: outputAst.ExternalReference;
|
3826 | static attribute: outputAst.ExternalReference;
|
3827 | static attributeInterpolate1: outputAst.ExternalReference;
|
3828 | static attributeInterpolate2: outputAst.ExternalReference;
|
3829 | static attributeInterpolate3: outputAst.ExternalReference;
|
3830 | static attributeInterpolate4: outputAst.ExternalReference;
|
3831 | static attributeInterpolate5: outputAst.ExternalReference;
|
3832 | static attributeInterpolate6: outputAst.ExternalReference;
|
3833 | static attributeInterpolate7: outputAst.ExternalReference;
|
3834 | static attributeInterpolate8: outputAst.ExternalReference;
|
3835 | static attributeInterpolateV: outputAst.ExternalReference;
|
3836 | static classProp: outputAst.ExternalReference;
|
3837 | static elementContainerStart: outputAst.ExternalReference;
|
3838 | static elementContainerEnd: outputAst.ExternalReference;
|
3839 | static elementContainer: outputAst.ExternalReference;
|
3840 | static styleMap: outputAst.ExternalReference;
|
3841 | static styleMapInterpolate1: outputAst.ExternalReference;
|
3842 | static styleMapInterpolate2: outputAst.ExternalReference;
|
3843 | static styleMapInterpolate3: outputAst.ExternalReference;
|
3844 | static styleMapInterpolate4: outputAst.ExternalReference;
|
3845 | static styleMapInterpolate5: outputAst.ExternalReference;
|
3846 | static styleMapInterpolate6: outputAst.ExternalReference;
|
3847 | static styleMapInterpolate7: outputAst.ExternalReference;
|
3848 | static styleMapInterpolate8: outputAst.ExternalReference;
|
3849 | static styleMapInterpolateV: outputAst.ExternalReference;
|
3850 | static classMap: outputAst.ExternalReference;
|
3851 | static classMapInterpolate1: outputAst.ExternalReference;
|
3852 | static classMapInterpolate2: outputAst.ExternalReference;
|
3853 | static classMapInterpolate3: outputAst.ExternalReference;
|
3854 | static classMapInterpolate4: outputAst.ExternalReference;
|
3855 | static classMapInterpolate5: outputAst.ExternalReference;
|
3856 | static classMapInterpolate6: outputAst.ExternalReference;
|
3857 | static classMapInterpolate7: outputAst.ExternalReference;
|
3858 | static classMapInterpolate8: outputAst.ExternalReference;
|
3859 | static classMapInterpolateV: outputAst.ExternalReference;
|
3860 | static styleProp: outputAst.ExternalReference;
|
3861 | static stylePropInterpolate1: outputAst.ExternalReference;
|
3862 | static stylePropInterpolate2: outputAst.ExternalReference;
|
3863 | static stylePropInterpolate3: outputAst.ExternalReference;
|
3864 | static stylePropInterpolate4: outputAst.ExternalReference;
|
3865 | static stylePropInterpolate5: outputAst.ExternalReference;
|
3866 | static stylePropInterpolate6: outputAst.ExternalReference;
|
3867 | static stylePropInterpolate7: outputAst.ExternalReference;
|
3868 | static stylePropInterpolate8: outputAst.ExternalReference;
|
3869 | static stylePropInterpolateV: outputAst.ExternalReference;
|
3870 | static nextContext: outputAst.ExternalReference;
|
3871 | static resetView: outputAst.ExternalReference;
|
3872 | static templateCreate: outputAst.ExternalReference;
|
3873 | static defer: outputAst.ExternalReference;
|
3874 | static deferWhen: outputAst.ExternalReference;
|
3875 | static deferOnIdle: outputAst.ExternalReference;
|
3876 | static deferOnImmediate: outputAst.ExternalReference;
|
3877 | static deferOnTimer: outputAst.ExternalReference;
|
3878 | static deferOnHover: outputAst.ExternalReference;
|
3879 | static deferOnInteraction: outputAst.ExternalReference;
|
3880 | static deferOnViewport: outputAst.ExternalReference;
|
3881 | static deferPrefetchWhen: outputAst.ExternalReference;
|
3882 | static deferPrefetchOnIdle: outputAst.ExternalReference;
|
3883 | static deferPrefetchOnImmediate: outputAst.ExternalReference;
|
3884 | static deferPrefetchOnTimer: outputAst.ExternalReference;
|
3885 | static deferPrefetchOnHover: outputAst.ExternalReference;
|
3886 | static deferPrefetchOnInteraction: outputAst.ExternalReference;
|
3887 | static deferPrefetchOnViewport: outputAst.ExternalReference;
|
3888 | static deferHydrateWhen: outputAst.ExternalReference;
|
3889 | static deferHydrateNever: outputAst.ExternalReference;
|
3890 | static deferHydrateOnIdle: outputAst.ExternalReference;
|
3891 | static deferHydrateOnImmediate: outputAst.ExternalReference;
|
3892 | static deferHydrateOnTimer: outputAst.ExternalReference;
|
3893 | static deferHydrateOnHover: outputAst.ExternalReference;
|
3894 | static deferHydrateOnInteraction: outputAst.ExternalReference;
|
3895 | static deferHydrateOnViewport: outputAst.ExternalReference;
|
3896 | static deferEnableTimerScheduling: outputAst.ExternalReference;
|
3897 | static conditional: outputAst.ExternalReference;
|
3898 | static repeater: outputAst.ExternalReference;
|
3899 | static repeaterCreate: outputAst.ExternalReference;
|
3900 | static repeaterTrackByIndex: outputAst.ExternalReference;
|
3901 | static repeaterTrackByIdentity: outputAst.ExternalReference;
|
3902 | static componentInstance: outputAst.ExternalReference;
|
3903 | static text: outputAst.ExternalReference;
|
3904 | static enableBindings: outputAst.ExternalReference;
|
3905 | static disableBindings: outputAst.ExternalReference;
|
3906 | static getCurrentView: outputAst.ExternalReference;
|
3907 | static textInterpolate: outputAst.ExternalReference;
|
3908 | static textInterpolate1: outputAst.ExternalReference;
|
3909 | static textInterpolate2: outputAst.ExternalReference;
|
3910 | static textInterpolate3: outputAst.ExternalReference;
|
3911 | static textInterpolate4: outputAst.ExternalReference;
|
3912 | static textInterpolate5: outputAst.ExternalReference;
|
3913 | static textInterpolate6: outputAst.ExternalReference;
|
3914 | static textInterpolate7: outputAst.ExternalReference;
|
3915 | static textInterpolate8: outputAst.ExternalReference;
|
3916 | static textInterpolateV: outputAst.ExternalReference;
|
3917 | static restoreView: outputAst.ExternalReference;
|
3918 | static pureFunction0: outputAst.ExternalReference;
|
3919 | static pureFunction1: outputAst.ExternalReference;
|
3920 | static pureFunction2: outputAst.ExternalReference;
|
3921 | static pureFunction3: outputAst.ExternalReference;
|
3922 | static pureFunction4: outputAst.ExternalReference;
|
3923 | static pureFunction5: outputAst.ExternalReference;
|
3924 | static pureFunction6: outputAst.ExternalReference;
|
3925 | static pureFunction7: outputAst.ExternalReference;
|
3926 | static pureFunction8: outputAst.ExternalReference;
|
3927 | static pureFunctionV: outputAst.ExternalReference;
|
3928 | static pipeBind1: outputAst.ExternalReference;
|
3929 | static pipeBind2: outputAst.ExternalReference;
|
3930 | static pipeBind3: outputAst.ExternalReference;
|
3931 | static pipeBind4: outputAst.ExternalReference;
|
3932 | static pipeBindV: outputAst.ExternalReference;
|
3933 | static hostProperty: outputAst.ExternalReference;
|
3934 | static property: outputAst.ExternalReference;
|
3935 | static propertyInterpolate: outputAst.ExternalReference;
|
3936 | static propertyInterpolate1: outputAst.ExternalReference;
|
3937 | static propertyInterpolate2: outputAst.ExternalReference;
|
3938 | static propertyInterpolate3: outputAst.ExternalReference;
|
3939 | static propertyInterpolate4: outputAst.ExternalReference;
|
3940 | static propertyInterpolate5: outputAst.ExternalReference;
|
3941 | static propertyInterpolate6: outputAst.ExternalReference;
|
3942 | static propertyInterpolate7: outputAst.ExternalReference;
|
3943 | static propertyInterpolate8: outputAst.ExternalReference;
|
3944 | static propertyInterpolateV: outputAst.ExternalReference;
|
3945 | static i18n: outputAst.ExternalReference;
|
3946 | static i18nAttributes: outputAst.ExternalReference;
|
3947 | static i18nExp: outputAst.ExternalReference;
|
3948 | static i18nStart: outputAst.ExternalReference;
|
3949 | static i18nEnd: outputAst.ExternalReference;
|
3950 | static i18nApply: outputAst.ExternalReference;
|
3951 | static i18nPostprocess: outputAst.ExternalReference;
|
3952 | static pipe: outputAst.ExternalReference;
|
3953 | static projection: outputAst.ExternalReference;
|
3954 | static projectionDef: outputAst.ExternalReference;
|
3955 | static reference: outputAst.ExternalReference;
|
3956 | static inject: outputAst.ExternalReference;
|
3957 | static injectAttribute: outputAst.ExternalReference;
|
3958 | static directiveInject: outputAst.ExternalReference;
|
3959 | static invalidFactory: outputAst.ExternalReference;
|
3960 | static invalidFactoryDep: outputAst.ExternalReference;
|
3961 | static templateRefExtractor: outputAst.ExternalReference;
|
3962 | static forwardRef: outputAst.ExternalReference;
|
3963 | static resolveForwardRef: outputAst.ExternalReference;
|
3964 | static replaceMetadata: outputAst.ExternalReference;
|
3965 | static ɵɵdefineInjectable: outputAst.ExternalReference;
|
3966 | static declareInjectable: outputAst.ExternalReference;
|
3967 | static InjectableDeclaration: outputAst.ExternalReference;
|
3968 | static resolveWindow: outputAst.ExternalReference;
|
3969 | static resolveDocument: outputAst.ExternalReference;
|
3970 | static resolveBody: outputAst.ExternalReference;
|
3971 | static getComponentDepsFactory: outputAst.ExternalReference;
|
3972 | static defineComponent: outputAst.ExternalReference;
|
3973 | static declareComponent: outputAst.ExternalReference;
|
3974 | static setComponentScope: outputAst.ExternalReference;
|
3975 | static ChangeDetectionStrategy: outputAst.ExternalReference;
|
3976 | static ViewEncapsulation: outputAst.ExternalReference;
|
3977 | static ComponentDeclaration: outputAst.ExternalReference;
|
3978 | static FactoryDeclaration: outputAst.ExternalReference;
|
3979 | static declareFactory: outputAst.ExternalReference;
|
3980 | static FactoryTarget: outputAst.ExternalReference;
|
3981 | static defineDirective: outputAst.ExternalReference;
|
3982 | static declareDirective: outputAst.ExternalReference;
|
3983 | static DirectiveDeclaration: outputAst.ExternalReference;
|
3984 | static InjectorDef: outputAst.ExternalReference;
|
3985 | static InjectorDeclaration: outputAst.ExternalReference;
|
3986 | static defineInjector: outputAst.ExternalReference;
|
3987 | static declareInjector: outputAst.ExternalReference;
|
3988 | static NgModuleDeclaration: outputAst.ExternalReference;
|
3989 | static ModuleWithProviders: outputAst.ExternalReference;
|
3990 | static defineNgModule: outputAst.ExternalReference;
|
3991 | static declareNgModule: outputAst.ExternalReference;
|
3992 | static setNgModuleScope: outputAst.ExternalReference;
|
3993 | static registerNgModuleType: outputAst.ExternalReference;
|
3994 | static PipeDeclaration: outputAst.ExternalReference;
|
3995 | static definePipe: outputAst.ExternalReference;
|
3996 | static declarePipe: outputAst.ExternalReference;
|
3997 | static declareClassMetadata: outputAst.ExternalReference;
|
3998 | static declareClassMetadataAsync: outputAst.ExternalReference;
|
3999 | static setClassMetadata: outputAst.ExternalReference;
|
4000 | static setClassMetadataAsync: outputAst.ExternalReference;
|
4001 | static setClassDebugInfo: outputAst.ExternalReference;
|
4002 | static queryRefresh: outputAst.ExternalReference;
|
4003 | static viewQuery: outputAst.ExternalReference;
|
4004 | static loadQuery: outputAst.ExternalReference;
|
4005 | static contentQuery: outputAst.ExternalReference;
|
4006 | static viewQuerySignal: outputAst.ExternalReference;
|
4007 | static contentQuerySignal: outputAst.ExternalReference;
|
4008 | static queryAdvance: outputAst.ExternalReference;
|
4009 | static twoWayProperty: outputAst.ExternalReference;
|
4010 | static twoWayBindingSet: outputAst.ExternalReference;
|
4011 | static twoWayListener: outputAst.ExternalReference;
|
4012 | static declareLet: outputAst.ExternalReference;
|
4013 | static storeLet: outputAst.ExternalReference;
|
4014 | static readContextLet: outputAst.ExternalReference;
|
4015 | static NgOnChangesFeature: outputAst.ExternalReference;
|
4016 | static InheritDefinitionFeature: outputAst.ExternalReference;
|
4017 | static CopyDefinitionFeature: outputAst.ExternalReference;
|
4018 | static ProvidersFeature: outputAst.ExternalReference;
|
4019 | static HostDirectivesFeature: outputAst.ExternalReference;
|
4020 | static InputTransformsFeatureFeature: outputAst.ExternalReference;
|
4021 | static ExternalStylesFeature: outputAst.ExternalReference;
|
4022 | static listener: outputAst.ExternalReference;
|
4023 | static getInheritedFactory: outputAst.ExternalReference;
|
4024 | static sanitizeHtml: outputAst.ExternalReference;
|
4025 | static sanitizeStyle: outputAst.ExternalReference;
|
4026 | static sanitizeResourceUrl: outputAst.ExternalReference;
|
4027 | static sanitizeScript: outputAst.ExternalReference;
|
4028 | static sanitizeUrl: outputAst.ExternalReference;
|
4029 | static sanitizeUrlOrResourceUrl: outputAst.ExternalReference;
|
4030 | static trustConstantHtml: outputAst.ExternalReference;
|
4031 | static trustConstantResourceUrl: outputAst.ExternalReference;
|
4032 | static validateIframeAttribute: outputAst.ExternalReference;
|
4033 | static InputSignalBrandWriteType: {
|
4034 | name: string;
|
4035 | moduleName: string;
|
4036 | };
|
4037 | static UnwrapDirectiveSignalInputs: {
|
4038 | name: string;
|
4039 | moduleName: string;
|
4040 | };
|
4041 | static unwrapWritableSignal: {
|
4042 | name: string;
|
4043 | moduleName: string;
|
4044 | };
|
4045 | }
|
4046 |
|
4047 | export declare interface R3InjectableMetadata {
|
4048 | name: string;
|
4049 | type: R3Reference;
|
4050 | typeArgumentCount: number;
|
4051 | providedIn: MaybeForwardRefExpression;
|
4052 | useClass?: MaybeForwardRefExpression;
|
4053 | useFactory?: outputAst.Expression;
|
4054 | useExisting?: MaybeForwardRefExpression;
|
4055 | useValue?: MaybeForwardRefExpression;
|
4056 | deps?: R3DependencyMetadata[];
|
4057 | }
|
4058 |
|
4059 | export declare interface R3InjectorMetadata {
|
4060 | name: string;
|
4061 | type: R3Reference;
|
4062 | providers: outputAst.Expression | null;
|
4063 | imports: outputAst.Expression[];
|
4064 | }
|
4065 |
|
4066 | /**
|
4067 | * Metadata for an individual input on a directive.
|
4068 | */
|
4069 | export declare interface R3InputMetadata {
|
4070 | classPropertyName: string;
|
4071 | bindingPropertyName: string;
|
4072 | required: boolean;
|
4073 | isSignal: boolean;
|
4074 | /**
|
4075 | * Transform function for the input.
|
4076 | *
|
4077 | * Null if there is no transform, or if this is a signal input.
|
4078 | * Signal inputs capture their transform as part of the `InputSignal`.
|
4079 | */
|
4080 | transformFunction: outputAst.Expression | null;
|
4081 | }
|
4082 |
|
4083 | /**
|
4084 | * Generates Source Span object for a given R3 Type for JIT mode.
|
4085 | *
|
4086 | * @param kind Component or Directive.
|
4087 | * @param typeName name of the Component or Directive.
|
4088 | * @param sourceUrl reference to Component or Directive source.
|
4089 | * @returns instance of ParseSourceSpan that represent a given Component or Directive.
|
4090 | */
|
4091 | export declare function r3JitTypeSourceSpan(kind: string, typeName: string, sourceUrl: string): ParseSourceSpan;
|
4092 |
|
4093 | export declare interface R3NgModuleDependencyMetadata extends R3TemplateDependency {
|
4094 | kind: R3TemplateDependencyKind.NgModule;
|
4095 | }
|
4096 |
|
4097 | /**
|
4098 | * Metadata required by the module compiler to generate a module def (`ɵmod`) for a type.
|
4099 | */
|
4100 | export declare type R3NgModuleMetadata = R3NgModuleMetadataGlobal | R3NgModuleMetadataLocal;
|
4101 |
|
4102 | declare interface R3NgModuleMetadataCommon {
|
4103 | kind: R3NgModuleMetadataKind;
|
4104 | /**
|
4105 | * An expression representing the module type being compiled.
|
4106 | */
|
4107 | type: R3Reference;
|
4108 | /**
|
4109 | * How to emit the selector scope values (declarations, imports, exports).
|
4110 | */
|
4111 | selectorScopeMode: R3SelectorScopeMode;
|
4112 | /**
|
4113 | * The set of schemas that declare elements to be allowed in the NgModule.
|
4114 | */
|
4115 | schemas: R3Reference[] | null;
|
4116 | /** Unique ID or expression representing the unique ID of an NgModule. */
|
4117 | id: outputAst.Expression | null;
|
4118 | }
|
4119 |
|
4120 | /**
|
4121 | * Metadata required by the module compiler in full/partial mode to generate a module def (`ɵmod`)
|
4122 | * for a type.
|
4123 | */
|
4124 | export declare interface R3NgModuleMetadataGlobal extends R3NgModuleMetadataCommon {
|
4125 | kind: R3NgModuleMetadataKind.Global;
|
4126 | /**
|
4127 | * An array of expressions representing the bootstrap components specified by the module.
|
4128 | */
|
4129 | bootstrap: R3Reference[];
|
4130 | /**
|
4131 | * An array of expressions representing the directives and pipes declared by the module.
|
4132 | */
|
4133 | declarations: R3Reference[];
|
4134 | /**
|
4135 | * Those declarations which should be visible to downstream consumers. If not specified, all
|
4136 | * declarations are made visible to downstream consumers.
|
4137 | */
|
4138 | publicDeclarationTypes: outputAst.Expression[] | null;
|
4139 | /**
|
4140 | * An array of expressions representing the imports of the module.
|
4141 | */
|
4142 | imports: R3Reference[];
|
4143 | /**
|
4144 | * Whether or not to include `imports` in generated type declarations.
|
4145 | */
|
4146 | includeImportTypes: boolean;
|
4147 | /**
|
4148 | * An array of expressions representing the exports of the module.
|
4149 | */
|
4150 | exports: R3Reference[];
|
4151 | /**
|
4152 | * Whether to generate closure wrappers for bootstrap, declarations, imports, and exports.
|
4153 | */
|
4154 | containsForwardDecls: boolean;
|
4155 | }
|
4156 |
|
4157 | /**
|
4158 | * The type of the NgModule meta data.
|
4159 | * - Global: Used for full and partial compilation modes which mainly includes R3References.
|
4160 | * - Local: Used for the local compilation mode which mainly includes the raw expressions as appears
|
4161 | * in the NgModule decorator.
|
4162 | */
|
4163 | export declare enum R3NgModuleMetadataKind {
|
4164 | Global = 0,
|
4165 | Local = 1
|
4166 | }
|
4167 |
|
4168 | /**
|
4169 | * Metadata required by the module compiler in local mode to generate a module def (`ɵmod`) for a
|
4170 | * type.
|
4171 | */
|
4172 | declare interface R3NgModuleMetadataLocal extends R3NgModuleMetadataCommon {
|
4173 | kind: R3NgModuleMetadataKind.Local;
|
4174 | /**
|
4175 | * The output expression representing the bootstrap components specified by the module.
|
4176 | */
|
4177 | bootstrapExpression: outputAst.Expression | null;
|
4178 | /**
|
4179 | * The output expression representing the declarations of the module.
|
4180 | */
|
4181 | declarationsExpression: outputAst.Expression | null;
|
4182 | /**
|
4183 | * The output expression representing the imports of the module.
|
4184 | */
|
4185 | importsExpression: outputAst.Expression | null;
|
4186 | /**
|
4187 | * The output expression representing the exports of the module.
|
4188 | */
|
4189 | exportsExpression: outputAst.Expression | null;
|
4190 | /**
|
4191 | * Local compilation mode always requires scope to be handled using side effect function calls.
|
4192 | */
|
4193 | selectorScopeMode: R3SelectorScopeMode.SideEffect;
|
4194 | }
|
4195 |
|
4196 | export declare interface R3PartialDeclaration {
|
4197 | /**
|
4198 | * The minimum version of the compiler that can process this partial declaration.
|
4199 | */
|
4200 | minVersion: string;
|
4201 | /**
|
4202 | * Version number of the Angular compiler that was used to compile this declaration. The linker
|
4203 | * will be able to detect which version a library is using and interpret its metadata accordingly.
|
4204 | */
|
4205 | version: string;
|
4206 | /**
|
4207 | * A reference to the `@angular/core` ES module, which allows access
|
4208 | * to all Angular exports, including Ivy instructions.
|
4209 | */
|
4210 | ngImport: outputAst.Expression;
|
4211 | /**
|
4212 | * Reference to the decorated class, which is subject to this partial declaration.
|
4213 | */
|
4214 | type: outputAst.Expression;
|
4215 | }
|
4216 |
|
4217 | export declare interface R3PipeDependencyMetadata extends R3TemplateDependency {
|
4218 | kind: R3TemplateDependencyKind.Pipe;
|
4219 | name: string;
|
4220 | }
|
4221 |
|
4222 | export declare interface R3PipeMetadata {
|
4223 | /**
|
4224 | * Name of the pipe type.
|
4225 | */
|
4226 | name: string;
|
4227 | /**
|
4228 | * An expression representing a reference to the pipe itself.
|
4229 | */
|
4230 | type: R3Reference;
|
4231 | /**
|
4232 | * Number of generic type parameters of the type itself.
|
4233 | */
|
4234 | typeArgumentCount: number;
|
4235 | /**
|
4236 | * Name of the pipe.
|
4237 | */
|
4238 | pipeName: string;
|
4239 | /**
|
4240 | * Dependencies of the pipe's constructor.
|
4241 | */
|
4242 | deps: R3DependencyMetadata[] | null;
|
4243 | /**
|
4244 | * Whether the pipe is marked as pure.
|
4245 | */
|
4246 | pure: boolean;
|
4247 | /**
|
4248 | * Whether the pipe is standalone.
|
4249 | */
|
4250 | isStandalone: boolean;
|
4251 | }
|
4252 |
|
4253 | /**
|
4254 | * Information needed to compile a query (view or content).
|
4255 | */
|
4256 | export declare interface R3QueryMetadata {
|
4257 | /**
|
4258 | * Name of the property on the class to update with query results.
|
4259 | */
|
4260 | propertyName: string;
|
4261 | /**
|
4262 | * Whether to read only the first matching result, or an array of results.
|
4263 | */
|
4264 | first: boolean;
|
4265 | /**
|
4266 | * Either an expression representing a type or `InjectionToken` for the query
|
4267 | * predicate, or a set of string selectors.
|
4268 | *
|
4269 | * Note: At compile time we split selectors as an optimization that avoids this
|
4270 | * extra work at runtime creation phase.
|
4271 | *
|
4272 | * Notably, if the selector is not statically analyzable due to an expression,
|
4273 | * the selectors may need to be split up at runtime.
|
4274 | */
|
4275 | predicate: MaybeForwardRefExpression | string[];
|
4276 | /**
|
4277 | * Whether to include only direct children or all descendants.
|
4278 | */
|
4279 | descendants: boolean;
|
4280 | /**
|
4281 | * If the `QueryList` should fire change event only if actual change to query was computed (vs old
|
4282 | * behavior where the change was fired whenever the query was recomputed, even if the recomputed
|
4283 | * query resulted in the same list.)
|
4284 | */
|
4285 | emitDistinctChangesOnly: boolean;
|
4286 | /**
|
4287 | * An expression representing a type to read from each matched node, or null if the default value
|
4288 | * for a given node is to be returned.
|
4289 | */
|
4290 | read: outputAst.Expression | null;
|
4291 | /**
|
4292 | * Whether or not this query should collect only static results.
|
4293 | *
|
4294 | * If static is true, the query's results will be set on the component after nodes are created,
|
4295 | * but before change detection runs. This means that any results that relied upon change detection
|
4296 | * to run (e.g. results inside *ngIf or *ngFor views) will not be collected. Query results are
|
4297 | * available in the ngOnInit hook.
|
4298 | *
|
4299 | * If static is false, the query's results will be set on the component after change detection
|
4300 | * runs. This means that the query results can contain nodes inside *ngIf or *ngFor views, but
|
4301 | * the results will not be available in the ngOnInit hook (only in the ngAfterContentInit for
|
4302 | * content hooks and ngAfterViewInit for view hooks).
|
4303 | *
|
4304 | * Note: For signal-based queries, this option does not have any effect.
|
4305 | */
|
4306 | static: boolean;
|
4307 | /** Whether the query is signal-based. */
|
4308 | isSignal: boolean;
|
4309 | }
|
4310 |
|
4311 | export declare interface R3Reference {
|
4312 | value: outputAst.Expression;
|
4313 | type: outputAst.Expression;
|
4314 | }
|
4315 |
|
4316 | /**
|
4317 | * How the selector scope of an NgModule (its declarations, imports, and exports) should be emitted
|
4318 | * as a part of the NgModule definition.
|
4319 | */
|
4320 | export declare enum R3SelectorScopeMode {
|
4321 | /**
|
4322 | * Emit the declarations inline into the module definition.
|
4323 | *
|
4324 | * This option is useful in certain contexts where it's known that JIT support is required. The
|
4325 | * tradeoff here is that this emit style prevents directives and pipes from being tree-shaken if
|
4326 | * they are unused, but the NgModule is used.
|
4327 | */
|
4328 | Inline = 0,
|
4329 | /**
|
4330 | * Emit the declarations using a side effectful function call, `ɵɵsetNgModuleScope`, that is
|
4331 | * guarded with the `ngJitMode` flag.
|
4332 | *
|
4333 | * This form of emit supports JIT and can be optimized away if the `ngJitMode` flag is set to
|
4334 | * false, which allows unused directives and pipes to be tree-shaken.
|
4335 | */
|
4336 | SideEffect = 1,
|
4337 | /**
|
4338 | * Don't generate selector scopes at all.
|
4339 | *
|
4340 | * This is useful for contexts where JIT support is known to be unnecessary.
|
4341 | */
|
4342 | Omit = 2
|
4343 | }
|
4344 |
|
4345 | /**
|
4346 | * Processes `Target`s with a given set of directives and performs a binding operation, which
|
4347 | * returns an object similar to TypeScript's `ts.TypeChecker` that contains knowledge about the
|
4348 | * target.
|
4349 | */
|
4350 | export declare class R3TargetBinder<DirectiveT extends DirectiveMeta> implements TargetBinder<DirectiveT> {
|
4351 | private directiveMatcher;
|
4352 | constructor(directiveMatcher: SelectorMatcher<DirectiveT[]>);
|
4353 | /**
|
4354 | * Perform a binding operation on the given `Target` and return a `BoundTarget` which contains
|
4355 | * metadata about the types referenced in the template.
|
4356 | */
|
4357 | bind(target: Target): BoundTarget<DirectiveT>;
|
4358 | }
|
4359 |
|
4360 | /**
|
4361 | * A dependency that's used within a component template.
|
4362 | */
|
4363 | export declare interface R3TemplateDependency {
|
4364 | kind: R3TemplateDependencyKind;
|
4365 | /**
|
4366 | * The type of the dependency as an expression.
|
4367 | */
|
4368 | type: outputAst.Expression;
|
4369 | }
|
4370 |
|
4371 | export declare enum R3TemplateDependencyKind {
|
4372 | Directive = 0,
|
4373 | Pipe = 1,
|
4374 | NgModule = 2
|
4375 | }
|
4376 |
|
4377 | /**
|
4378 | * A dependency that's used within a component template
|
4379 | */
|
4380 | export declare type R3TemplateDependencyMetadata = R3DirectiveDependencyMetadata | R3PipeDependencyMetadata | R3NgModuleDependencyMetadata;
|
4381 |
|
4382 | export declare class ReadKeyExpr extends Expression {
|
4383 | receiver: Expression;
|
4384 | index: Expression;
|
4385 | constructor(receiver: Expression, index: Expression, type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
4386 | isEquivalent(e: Expression): boolean;
|
4387 | isConstant(): boolean;
|
4388 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
4389 | set(value: Expression): WriteKeyExpr;
|
4390 | clone(): ReadKeyExpr;
|
4391 | }
|
4392 |
|
4393 | export declare class ReadPropExpr extends Expression {
|
4394 | receiver: Expression;
|
4395 | name: string;
|
4396 | constructor(receiver: Expression, name: string, type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
4397 | get index(): string;
|
4398 | isEquivalent(e: Expression): boolean;
|
4399 | isConstant(): boolean;
|
4400 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
4401 | set(value: Expression): WritePropExpr;
|
4402 | clone(): ReadPropExpr;
|
4403 | }
|
4404 |
|
4405 | export declare class ReadVarExpr extends Expression {
|
4406 | name: string;
|
4407 | constructor(name: string, type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
4408 | isEquivalent(e: Expression): boolean;
|
4409 | isConstant(): boolean;
|
4410 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
4411 | clone(): ReadVarExpr;
|
4412 | set(value: Expression): WriteVarExpr;
|
4413 | }
|
4414 |
|
4415 | declare class RecurseVisitor implements Visitor_2 {
|
4416 | visitText(text: Text_3, context?: any): any;
|
4417 | visitContainer(container: Container, context?: any): any;
|
4418 | visitIcu(icu: Icu, context?: any): any;
|
4419 | visitTagPlaceholder(ph: TagPlaceholder, context?: any): any;
|
4420 | visitPlaceholder(ph: Placeholder, context?: any): any;
|
4421 | visitIcuPlaceholder(ph: IcuPlaceholder, context?: any): any;
|
4422 | visitBlockPlaceholder(ph: BlockPlaceholder, context?: any): any;
|
4423 | }
|
4424 |
|
4425 | export declare class RecursiveAstVisitor implements AstVisitor {
|
4426 | visit(ast: AST, context?: any): any;
|
4427 | visitUnary(ast: Unary, context: any): any;
|
4428 | visitBinary(ast: Binary, context: any): any;
|
4429 | visitChain(ast: Chain, context: any): any;
|
4430 | visitConditional(ast: Conditional, context: any): any;
|
4431 | visitPipe(ast: BindingPipe, context: any): any;
|
4432 | visitImplicitReceiver(ast: ThisReceiver, context: any): any;
|
4433 | visitThisReceiver(ast: ThisReceiver, context: any): any;
|
4434 | visitInterpolation(ast: Interpolation, context: any): any;
|
4435 | visitKeyedRead(ast: KeyedRead, context: any): any;
|
4436 | visitKeyedWrite(ast: KeyedWrite, context: any): any;
|
4437 | visitLiteralArray(ast: LiteralArray, context: any): any;
|
4438 | visitLiteralMap(ast: LiteralMap, context: any): any;
|
4439 | visitLiteralPrimitive(ast: LiteralPrimitive, context: any): any;
|
4440 | visitPrefixNot(ast: PrefixNot, context: any): any;
|
4441 | visitTypeofExpresion(ast: TypeofExpression, context: any): void;
|
4442 | visitNonNullAssert(ast: NonNullAssert, context: any): any;
|
4443 | visitPropertyRead(ast: PropertyRead, context: any): any;
|
4444 | visitPropertyWrite(ast: PropertyWrite, context: any): any;
|
4445 | visitSafePropertyRead(ast: SafePropertyRead, context: any): any;
|
4446 | visitSafeKeyedRead(ast: SafeKeyedRead, context: any): any;
|
4447 | visitCall(ast: Call, context: any): any;
|
4448 | visitSafeCall(ast: SafeCall, context: any): any;
|
4449 | visitAll(asts: AST[], context: any): any;
|
4450 | }
|
4451 |
|
4452 | declare class RecursiveAstVisitor_2 implements StatementVisitor, ExpressionVisitor {
|
4453 | visitType(ast: Type, context: any): any;
|
4454 | visitExpression(ast: Expression, context: any): any;
|
4455 | visitBuiltinType(type: BuiltinType, context: any): any;
|
4456 | visitExpressionType(type: ExpressionType, context: any): any;
|
4457 | visitArrayType(type: ArrayType, context: any): any;
|
4458 | visitMapType(type: MapType, context: any): any;
|
4459 | visitTransplantedType(type: TransplantedType<unknown>, context: any): any;
|
4460 | visitWrappedNodeExpr(ast: WrappedNodeExpr<any>, context: any): any;
|
4461 | visitTypeofExpr(ast: TypeofExpr, context: any): any;
|
4462 | visitReadVarExpr(ast: ReadVarExpr, context: any): any;
|
4463 | visitWriteVarExpr(ast: WriteVarExpr, context: any): any;
|
4464 | visitWriteKeyExpr(ast: WriteKeyExpr, context: any): any;
|
4465 | visitWritePropExpr(ast: WritePropExpr, context: any): any;
|
4466 | visitDynamicImportExpr(ast: DynamicImportExpr, context: any): any;
|
4467 | visitInvokeFunctionExpr(ast: InvokeFunctionExpr, context: any): any;
|
4468 | visitTaggedTemplateExpr(ast: TaggedTemplateExpr, context: any): any;
|
4469 | visitInstantiateExpr(ast: InstantiateExpr, context: any): any;
|
4470 | visitLiteralExpr(ast: LiteralExpr, context: any): any;
|
4471 | visitLocalizedString(ast: LocalizedString, context: any): any;
|
4472 | visitExternalExpr(ast: ExternalExpr, context: any): any;
|
4473 | visitConditionalExpr(ast: ConditionalExpr, context: any): any;
|
4474 | visitNotExpr(ast: NotExpr, context: any): any;
|
4475 | visitFunctionExpr(ast: FunctionExpr, context: any): any;
|
4476 | visitArrowFunctionExpr(ast: ArrowFunctionExpr, context: any): any;
|
4477 | visitUnaryOperatorExpr(ast: UnaryOperatorExpr, context: any): any;
|
4478 | visitBinaryOperatorExpr(ast: BinaryOperatorExpr, context: any): any;
|
4479 | visitReadPropExpr(ast: ReadPropExpr, context: any): any;
|
4480 | visitReadKeyExpr(ast: ReadKeyExpr, context: any): any;
|
4481 | visitLiteralArrayExpr(ast: LiteralArrayExpr, context: any): any;
|
4482 | visitLiteralMapExpr(ast: LiteralMapExpr, context: any): any;
|
4483 | visitCommaExpr(ast: CommaExpr, context: any): any;
|
4484 | visitAllExpressions(exprs: Expression[], context: any): void;
|
4485 | visitDeclareVarStmt(stmt: DeclareVarStmt, context: any): any;
|
4486 | visitDeclareFunctionStmt(stmt: DeclareFunctionStmt, context: any): any;
|
4487 | visitExpressionStmt(stmt: ExpressionStatement, context: any): any;
|
4488 | visitReturnStmt(stmt: ReturnStatement, context: any): any;
|
4489 | visitIfStmt(stmt: IfStmt, context: any): any;
|
4490 | visitAllStatements(stmts: Statement[], context: any): void;
|
4491 | }
|
4492 |
|
4493 | export declare class RecursiveVisitor implements Visitor {
|
4494 | constructor();
|
4495 | visitElement(ast: Element_2, context: any): any;
|
4496 | visitAttribute(ast: Attribute, context: any): any;
|
4497 | visitText(ast: Text_2, context: any): any;
|
4498 | visitComment(ast: Comment_2, context: any): any;
|
4499 | visitExpansion(ast: Expansion, context: any): any;
|
4500 | visitExpansionCase(ast: ExpansionCase, context: any): any;
|
4501 | visitBlock(block: Block, context: any): any;
|
4502 | visitBlockParameter(ast: BlockParameter, context: any): any;
|
4503 | visitLetDeclaration(decl: LetDeclaration, context: any): void;
|
4504 | private visitChildren;
|
4505 | }
|
4506 |
|
4507 | /** Possible values that a reference can be resolved to. */
|
4508 | export declare type ReferenceTarget<DirectiveT> = {
|
4509 | directive: DirectiveT;
|
4510 | node: TmplAstElement | TmplAstTemplate;
|
4511 | } | TmplAstElement | TmplAstTemplate;
|
4512 |
|
4513 | /**
|
4514 | * Flags passed into template functions to determine which blocks (i.e. creation, update)
|
4515 | * should be executed.
|
4516 | *
|
4517 | * Typically, a template runs both the creation block and the update block on initialization and
|
4518 | * subsequent runs only execute the update block. However, dynamically created views require that
|
4519 | * the creation block be executed separately from the update block (for backwards compat).
|
4520 | */
|
4521 | declare const enum RenderFlags {
|
4522 | Create = 1,
|
4523 | Update = 2
|
4524 | }
|
4525 |
|
4526 |
|
4527 | /**
|
4528 | * An interface for retrieving documents by URL that the compiler uses to
|
4529 | * load templates.
|
4530 | *
|
4531 | * This is an abstract class, rather than an interface, so that it can be used
|
4532 | * as injection token.
|
4533 | */
|
4534 | export declare abstract class ResourceLoader {
|
4535 | abstract get(url: string): Promise<string> | string;
|
4536 | }
|
4537 |
|
4538 | export declare class ReturnStatement extends Statement {
|
4539 | value: Expression;
|
4540 | constructor(value: Expression, sourceSpan?: ParseSourceSpan | null, leadingComments?: LeadingComment[]);
|
4541 | isEquivalent(stmt: Statement): boolean;
|
4542 | visitStatement(visitor: StatementVisitor, context: any): any;
|
4543 | }
|
4544 |
|
4545 | export declare class SafeCall extends AST {
|
4546 | receiver: AST;
|
4547 | args: AST[];
|
4548 | argumentSpan: AbsoluteSourceSpan;
|
4549 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, receiver: AST, args: AST[], argumentSpan: AbsoluteSourceSpan);
|
4550 | visit(visitor: AstVisitor, context?: any): any;
|
4551 | }
|
4552 |
|
4553 | export declare class SafeKeyedRead extends AST {
|
4554 | receiver: AST;
|
4555 | key: AST;
|
4556 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, receiver: AST, key: AST);
|
4557 | visit(visitor: AstVisitor, context?: any): any;
|
4558 | }
|
4559 |
|
4560 | export declare class SafePropertyRead extends ASTWithName {
|
4561 | receiver: AST;
|
4562 | name: string;
|
4563 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, nameSpan: AbsoluteSourceSpan, receiver: AST, name: string);
|
4564 | visit(visitor: AstVisitor, context?: any): any;
|
4565 | }
|
4566 |
|
4567 | export declare function sanitizeIdentifier(name: string): string;
|
4568 |
|
4569 | export declare interface SchemaMetadata {
|
4570 | name: string;
|
4571 | }
|
4572 |
|
4573 | /**
|
4574 | * Represents a binding scope within a template.
|
4575 | *
|
4576 | * Any variables, references, or other named entities declared within the template will
|
4577 | * be captured and available by name in `namedEntities`. Additionally, child templates will
|
4578 | * be analyzed and have their child `Scope`s available in `childScopes`.
|
4579 | */
|
4580 | declare class Scope implements TmplAstVisitor {
|
4581 | readonly parentScope: Scope | null;
|
4582 | readonly rootNode: ScopedNode | null;
|
4583 | /**
|
4584 | * Named members of the `Scope`, such as `Reference`s or `Variable`s.
|
4585 | */
|
4586 | readonly namedEntities: Map<string, TemplateEntity>;
|
4587 | /**
|
4588 | * Set of elements that belong to this scope.
|
4589 | */
|
4590 | readonly elementsInScope: Set<TmplAstElement>;
|
4591 | /**
|
4592 | * Child `Scope`s for immediately nested `ScopedNode`s.
|
4593 | */
|
4594 | readonly childScopes: Map<ScopedNode, Scope>;
|
4595 | /** Whether this scope is deferred or if any of its ancestors are deferred. */
|
4596 | readonly isDeferred: boolean;
|
4597 | private constructor();
|
4598 | static newRootScope(): Scope;
|
4599 | /**
|
4600 | * Process a template (either as a `Template` sub-template with variables, or a plain array of
|
4601 | * template `Node`s) and construct its `Scope`.
|
4602 | */
|
4603 | static apply(template: TmplAstNode[]): Scope;
|
4604 | /**
|
4605 | * Internal method to process the scoped node and populate the `Scope`.
|
4606 | */
|
4607 | private ingest;
|
4608 | visitElement(element: TmplAstElement): void;
|
4609 | visitTemplate(template: TmplAstTemplate): void;
|
4610 | visitVariable(variable: TmplAstVariable): void;
|
4611 | visitReference(reference: TmplAstReference): void;
|
4612 | visitDeferredBlock(deferred: TmplAstDeferredBlock): void;
|
4613 | visitDeferredBlockPlaceholder(block: TmplAstDeferredBlockPlaceholder): void;
|
4614 | visitDeferredBlockError(block: TmplAstDeferredBlockError): void;
|
4615 | visitDeferredBlockLoading(block: TmplAstDeferredBlockLoading): void;
|
4616 | visitSwitchBlock(block: TmplAstSwitchBlock): void;
|
4617 | visitSwitchBlockCase(block: TmplAstSwitchBlockCase): void;
|
4618 | visitForLoopBlock(block: TmplAstForLoopBlock): void;
|
4619 | visitForLoopBlockEmpty(block: TmplAstForLoopBlockEmpty): void;
|
4620 | visitIfBlock(block: TmplAstIfBlock): void;
|
4621 | visitIfBlockBranch(block: TmplAstIfBlockBranch): void;
|
4622 | visitContent(content: TmplAstContent): void;
|
4623 | visitLetDeclaration(decl: TmplAstLetDeclaration): void;
|
4624 | visitBoundAttribute(attr: TmplAstBoundAttribute): void;
|
4625 | visitBoundEvent(event: TmplAstBoundEvent): void;
|
4626 | visitBoundText(text: TmplAstBoundText): void;
|
4627 | visitText(text: TmplAstText): void;
|
4628 | visitTextAttribute(attr: TmplAstTextAttribute): void;
|
4629 | visitIcu(icu: TmplAstIcu): void;
|
4630 | visitDeferredTrigger(trigger: TmplAstDeferredTrigger): void;
|
4631 | visitUnknownBlock(block: TmplAstUnknownBlock): void;
|
4632 | private maybeDeclare;
|
4633 | /**
|
4634 | * Look up a variable within this `Scope`.
|
4635 | *
|
4636 | * This can recurse into a parent `Scope` if it's available.
|
4637 | */
|
4638 | lookup(name: string): TemplateEntity | null;
|
4639 | /**
|
4640 | * Get the child scope for a `ScopedNode`.
|
4641 | *
|
4642 | * This should always be defined.
|
4643 | */
|
4644 | getChildScope(node: ScopedNode): Scope;
|
4645 | private ingestScopedNode;
|
4646 | }
|
4647 |
|
4648 | /** Node that has a `Scope` associated with it. */
|
4649 | export declare type ScopedNode = TmplAstTemplate | TmplAstSwitchBlockCase | TmplAstIfBlockBranch | TmplAstForLoopBlock | TmplAstForLoopBlockEmpty | TmplAstDeferredBlock | TmplAstDeferredBlockError | TmplAstDeferredBlockLoading | TmplAstDeferredBlockPlaceholder | TmplAstContent;
|
4650 |
|
4651 | declare enum SecurityContext {
|
4652 | NONE = 0,
|
4653 | HTML = 1,
|
4654 | STYLE = 2,
|
4655 | SCRIPT = 3,
|
4656 | URL = 4,
|
4657 | RESOURCE_URL = 5
|
4658 | }
|
4659 |
|
4660 | export declare class SelectorContext<T = any> {
|
4661 | selector: CssSelector;
|
4662 | cbContext: T;
|
4663 | listContext: SelectorListContext;
|
4664 | notSelectors: CssSelector[];
|
4665 | constructor(selector: CssSelector, cbContext: T, listContext: SelectorListContext);
|
4666 | finalize(cssSelector: CssSelector, callback: ((c: CssSelector, a: T) => void) | null): boolean;
|
4667 | }
|
4668 |
|
4669 | /**
|
4670 | * Flags used to generate R3-style CSS Selectors. They are pasted from
|
4671 | * core/src/render3/projection.ts because they cannot be referenced directly.
|
4672 | */
|
4673 | declare const enum SelectorFlags {
|
4674 | /** Indicates this is the beginning of a new negative selector */
|
4675 | NOT = 1,
|
4676 | /** Mode for matching attributes */
|
4677 | ATTRIBUTE = 2,
|
4678 | /** Mode for matching tag names */
|
4679 | ELEMENT = 4,
|
4680 | /** Mode for matching class names */
|
4681 | CLASS = 8
|
4682 | }
|
4683 |
|
4684 | export declare class SelectorListContext {
|
4685 | selectors: CssSelector[];
|
4686 | alreadyMatched: boolean;
|
4687 | constructor(selectors: CssSelector[]);
|
4688 | }
|
4689 |
|
4690 | /**
|
4691 | * Reads a list of CssSelectors and allows to calculate which ones
|
4692 | * are contained in a given CssSelector.
|
4693 | */
|
4694 | export declare class SelectorMatcher<T = any> {
|
4695 | static createNotMatcher(notSelectors: CssSelector[]): SelectorMatcher<null>;
|
4696 | private _elementMap;
|
4697 | private _elementPartialMap;
|
4698 | private _classMap;
|
4699 | private _classPartialMap;
|
4700 | private _attrValueMap;
|
4701 | private _attrValuePartialMap;
|
4702 | private _listContexts;
|
4703 | addSelectables(cssSelectors: CssSelector[], callbackCtxt?: T): void;
|
4704 | /**
|
4705 | * Add an object that can be found later on by calling `match`.
|
4706 | * @param cssSelector A css selector
|
4707 | * @param callbackCtxt An opaque object that will be given to the callback of the `match` function
|
4708 | */
|
4709 | private _addSelectable;
|
4710 | private _addTerminal;
|
4711 | private _addPartial;
|
4712 | /**
|
4713 | * Find the objects that have been added via `addSelectable`
|
4714 | * whose css selector is contained in the given css selector.
|
4715 | * @param cssSelector A css selector
|
4716 | * @param matchedCallback This callback will be called with the object handed into `addSelectable`
|
4717 | * @return boolean true if a match was found
|
4718 | */
|
4719 | match(cssSelector: CssSelector, matchedCallback: ((c: CssSelector, a: T) => void) | null): boolean;
|
4720 | }
|
4721 |
|
4722 | export declare abstract class Serializer {
|
4723 | abstract write(messages: i18n.Message[], locale: string | null): string;
|
4724 | abstract load(content: string, url: string): {
|
4725 | locale: string | null;
|
4726 | i18nNodesByMsgId: {
|
4727 | [msgId: string]: i18n.Node[];
|
4728 | };
|
4729 | };
|
4730 | abstract digest(message: i18n.Message): string;
|
4731 | createNameMapper(message: i18n.Message): PlaceholderMapper | null;
|
4732 | }
|
4733 |
|
4734 | declare interface SharedConstantDefinition extends ExpressionKeyFn {
|
4735 | toSharedConstantDeclaration(declName: string, keyExpr: outputAst.Expression): outputAst.Statement;
|
4736 | }
|
4737 |
|
4738 |
|
4739 | export declare type SourceMap = {
|
4740 | version: number;
|
4741 | file?: string;
|
4742 | sourceRoot: string;
|
4743 | sources: string[];
|
4744 | sourcesContent: (string | null)[];
|
4745 | mappings: string;
|
4746 | };
|
4747 |
|
4748 | declare class SourceMapGenerator {
|
4749 | private file;
|
4750 | private sourcesContent;
|
4751 | private lines;
|
4752 | private lastCol0;
|
4753 | private hasMappings;
|
4754 | constructor(file?: string | null);
|
4755 | addSource(url: string, content?: string | null): this;
|
4756 | addLine(): this;
|
4757 | addMapping(col0: number, sourceUrl?: string, sourceLine0?: number, sourceCol0?: number): this;
|
4758 | toJSON(): SourceMap | null;
|
4759 | toJsComment(): string;
|
4760 | }
|
4761 |
|
4762 | export declare class SplitInterpolation {
|
4763 | strings: InterpolationPiece[];
|
4764 | expressions: InterpolationPiece[];
|
4765 | offsets: number[];
|
4766 | constructor(strings: InterpolationPiece[], expressions: InterpolationPiece[], offsets: number[]);
|
4767 | }
|
4768 |
|
4769 | export declare function splitNsName(elementName: string, fatal?: boolean): [string | null, string];
|
4770 |
|
4771 | export declare abstract class Statement {
|
4772 | modifiers: StmtModifier;
|
4773 | sourceSpan: ParseSourceSpan | null;
|
4774 | leadingComments?: LeadingComment[] | undefined;
|
4775 | constructor(modifiers?: StmtModifier, sourceSpan?: ParseSourceSpan | null, leadingComments?: LeadingComment[] | undefined);
|
4776 | /**
|
4777 | * Calculates whether this statement produces the same value as the given statement.
|
4778 | * Note: We don't check Types nor ParseSourceSpans nor function arguments.
|
4779 | */
|
4780 | abstract isEquivalent(stmt: Statement): boolean;
|
4781 | abstract visitStatement(visitor: StatementVisitor, context: any): any;
|
4782 | hasModifier(modifier: StmtModifier): boolean;
|
4783 | addLeadingComment(leadingComment: LeadingComment): void;
|
4784 | }
|
4785 |
|
4786 | export declare interface StatementVisitor {
|
4787 | visitDeclareVarStmt(stmt: DeclareVarStmt, context: any): any;
|
4788 | visitDeclareFunctionStmt(stmt: DeclareFunctionStmt, context: any): any;
|
4789 | visitExpressionStmt(stmt: ExpressionStatement, context: any): any;
|
4790 | visitReturnStmt(stmt: ReturnStatement, context: any): any;
|
4791 | visitIfStmt(stmt: IfStmt, context: any): any;
|
4792 | }
|
4793 |
|
4794 | export declare enum StmtModifier {
|
4795 | None = 0,
|
4796 | Final = 1,
|
4797 | Private = 2,
|
4798 | Exported = 4,
|
4799 | Static = 8
|
4800 | }
|
4801 |
|
4802 | export declare const STRING_TYPE: BuiltinType;
|
4803 |
|
4804 | declare namespace t {
|
4805 | export {
|
4806 | tmplAstVisitAll as visitAll,
|
4807 | TmplAstNode as Node,
|
4808 | Comment_3 as Comment,
|
4809 | TmplAstText as Text,
|
4810 | TmplAstBoundText as BoundText,
|
4811 | TmplAstTextAttribute as TextAttribute,
|
4812 | TmplAstBoundAttribute as BoundAttribute,
|
4813 | TmplAstBoundEvent as BoundEvent,
|
4814 | TmplAstElement as Element,
|
4815 | TmplAstDeferredTrigger as DeferredTrigger,
|
4816 | TmplAstBoundDeferredTrigger as BoundDeferredTrigger,
|
4817 | TmplAstNeverDeferredTrigger as NeverDeferredTrigger,
|
4818 | TmplAstIdleDeferredTrigger as IdleDeferredTrigger,
|
4819 | TmplAstImmediateDeferredTrigger as ImmediateDeferredTrigger,
|
4820 | TmplAstHoverDeferredTrigger as HoverDeferredTrigger,
|
4821 | TmplAstTimerDeferredTrigger as TimerDeferredTrigger,
|
4822 | TmplAstInteractionDeferredTrigger as InteractionDeferredTrigger,
|
4823 | TmplAstViewportDeferredTrigger as ViewportDeferredTrigger,
|
4824 | TmplAstBlockNode as BlockNode,
|
4825 | TmplAstDeferredBlockPlaceholder as DeferredBlockPlaceholder,
|
4826 | TmplAstDeferredBlockLoading as DeferredBlockLoading,
|
4827 | TmplAstDeferredBlockError as DeferredBlockError,
|
4828 | TmplAstDeferredBlockTriggers as DeferredBlockTriggers,
|
4829 | TmplAstDeferredBlock as DeferredBlock,
|
4830 | TmplAstSwitchBlock as SwitchBlock,
|
4831 | TmplAstSwitchBlockCase as SwitchBlockCase,
|
4832 | TmplAstForLoopBlock as ForLoopBlock,
|
4833 | TmplAstForLoopBlockEmpty as ForLoopBlockEmpty,
|
4834 | TmplAstIfBlock as IfBlock,
|
4835 | TmplAstIfBlockBranch as IfBlockBranch,
|
4836 | TmplAstUnknownBlock as UnknownBlock,
|
4837 | TmplAstLetDeclaration as LetDeclaration,
|
4838 | TmplAstTemplate as Template,
|
4839 | TmplAstContent as Content,
|
4840 | TmplAstVariable as Variable,
|
4841 | TmplAstReference as Reference,
|
4842 | TmplAstIcu as Icu,
|
4843 | TmplAstVisitor as Visitor,
|
4844 | TmplAstRecursiveVisitor as RecursiveVisitor
|
4845 | }
|
4846 | }
|
4847 |
|
4848 |
|
4849 | export declare enum TagContentType {
|
4850 | RAW_TEXT = 0,
|
4851 | ESCAPABLE_RAW_TEXT = 1,
|
4852 | PARSABLE_DATA = 2
|
4853 | }
|
4854 |
|
4855 | export declare interface TagDefinition {
|
4856 | closedByParent: boolean;
|
4857 | implicitNamespacePrefix: string | null;
|
4858 | isVoid: boolean;
|
4859 | ignoreFirstLf: boolean;
|
4860 | canSelfClose: boolean;
|
4861 | preventNamespaceInheritance: boolean;
|
4862 | isClosedByChild(name: string): boolean;
|
4863 | getContentType(prefix?: string): TagContentType;
|
4864 | }
|
4865 |
|
4866 | declare function taggedTemplate(tag: Expression, template: TemplateLiteral, type?: Type | null, sourceSpan?: ParseSourceSpan | null): TaggedTemplateExpr;
|
4867 |
|
4868 | export declare class TaggedTemplateExpr extends Expression {
|
4869 | tag: Expression;
|
4870 | template: TemplateLiteral;
|
4871 | constructor(tag: Expression, template: TemplateLiteral, type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
4872 | isEquivalent(e: Expression): boolean;
|
4873 | isConstant(): boolean;
|
4874 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
4875 | clone(): TaggedTemplateExpr;
|
4876 | }
|
4877 |
|
4878 | declare class TagPlaceholder implements Node_3 {
|
4879 | tag: string;
|
4880 | attrs: {
|
4881 | [k: string]: string;
|
4882 | };
|
4883 | startName: string;
|
4884 | closeName: string;
|
4885 | children: Node_3[];
|
4886 | isVoid: boolean;
|
4887 | sourceSpan: ParseSourceSpan;
|
4888 | startSourceSpan: ParseSourceSpan | null;
|
4889 | endSourceSpan: ParseSourceSpan | null;
|
4890 | constructor(tag: string, attrs: {
|
4891 | [k: string]: string;
|
4892 | }, startName: string, closeName: string, children: Node_3[], isVoid: boolean, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan | null, endSourceSpan: ParseSourceSpan | null);
|
4893 | visit(visitor: Visitor_2, context?: any): any;
|
4894 | }
|
4895 |
|
4896 | /**
|
4897 | * A logical target for analysis, which could contain a template or other types of bindings.
|
4898 | */
|
4899 | export declare interface Target {
|
4900 | template?: TmplAstNode[];
|
4901 | }
|
4902 |
|
4903 | /**
|
4904 | * Interface to the binding API, which processes a template and returns an object similar to the
|
4905 | * `ts.TypeChecker`.
|
4906 | *
|
4907 | * The returned `BoundTarget` has an API for extracting information about the processed target.
|
4908 | */
|
4909 | export declare interface TargetBinder<D extends DirectiveMeta> {
|
4910 | bind(target: Target): BoundTarget<D>;
|
4911 | }
|
4912 |
|
4913 | /**
|
4914 | * TemplateBinding refers to a particular key-value pair in a microsyntax
|
4915 | * expression. A few examples are:
|
4916 | *
|
4917 | * |---------------------|--------------|---------|--------------|
|
4918 | * | expression | key | value | binding type |
|
4919 | * |---------------------|--------------|---------|--------------|
|
4920 | * | 1. let item | item | null | variable |
|
4921 | * | 2. of items | ngForOf | items | expression |
|
4922 | * | 3. let x = y | x | y | variable |
|
4923 | * | 4. index as i | i | index | variable |
|
4924 | * | 5. trackBy: func | ngForTrackBy | func | expression |
|
4925 | * | 6. *ngIf="cond" | ngIf | cond | expression |
|
4926 | * |---------------------|--------------|---------|--------------|
|
4927 | *
|
4928 | * (6) is a notable exception because it is a binding from the template key in
|
4929 | * the LHS of a HTML attribute to the expression in the RHS. All other bindings
|
4930 | * in the example above are derived solely from the RHS.
|
4931 | */
|
4932 | export declare type TemplateBinding = VariableBinding | ExpressionBinding;
|
4933 |
|
4934 | export declare interface TemplateBindingIdentifier {
|
4935 | source: string;
|
4936 | span: AbsoluteSourceSpan;
|
4937 | }
|
4938 |
|
4939 | export declare class TemplateBindingParseResult {
|
4940 | templateBindings: TemplateBinding[];
|
4941 | warnings: string[];
|
4942 | errors: ParserError[];
|
4943 | constructor(templateBindings: TemplateBinding[], warnings: string[], errors: ParserError[]);
|
4944 | }
|
4945 |
|
4946 | /** Entity that is local to the template and defined within the template. */
|
4947 | export declare type TemplateEntity = TmplAstReference | TmplAstVariable | TmplAstLetDeclaration;
|
4948 |
|
4949 | export declare class TemplateLiteral {
|
4950 | elements: TemplateLiteralElement[];
|
4951 | expressions: Expression[];
|
4952 | constructor(elements: TemplateLiteralElement[], expressions: Expression[]);
|
4953 | clone(): TemplateLiteral;
|
4954 | }
|
4955 |
|
4956 | export declare class TemplateLiteralElement {
|
4957 | text: string;
|
4958 | sourceSpan?: ParseSourceSpan | undefined;
|
4959 | rawText: string;
|
4960 | constructor(text: string, sourceSpan?: ParseSourceSpan | undefined, rawText?: string);
|
4961 | clone(): TemplateLiteralElement;
|
4962 | }
|
4963 |
|
4964 | declare class Text_2 extends NodeWithI18n {
|
4965 | value: string;
|
4966 | tokens: InterpolatedTextToken[];
|
4967 | constructor(value: string, sourceSpan: ParseSourceSpan, tokens: InterpolatedTextToken[], i18n?: I18nMeta_2);
|
4968 | visit(visitor: Visitor, context: any): any;
|
4969 | }
|
4970 | export { Text_2 as Text }
|
4971 |
|
4972 | declare class Text_3 implements Node_3 {
|
4973 | value: string;
|
4974 | sourceSpan: ParseSourceSpan;
|
4975 | constructor(value: string, sourceSpan: ParseSourceSpan);
|
4976 | visit(visitor: Visitor_2, context?: any): any;
|
4977 | }
|
4978 |
|
4979 | declare interface TextToken extends TokenBase {
|
4980 | type: LexerTokenType.TEXT | LexerTokenType.ESCAPABLE_RAW_TEXT | LexerTokenType.RAW_TEXT;
|
4981 | parts: [text: string];
|
4982 | }
|
4983 |
|
4984 | /**
|
4985 | * Receiver when something is accessed through `this` (e.g. `this.foo`). Note that this class
|
4986 | * inherits from `ImplicitReceiver`, because accessing something through `this` is treated the
|
4987 | * same as accessing it implicitly inside of an Angular template (e.g. `[attr.title]="this.title"`
|
4988 | * is the same as `[attr.title]="title"`.). Inheriting allows for the `this` accesses to be treated
|
4989 | * the same as implicit ones, except for a couple of exceptions like `$event` and `$any`.
|
4990 | * TODO: we should find a way for this class not to extend from `ImplicitReceiver` in the future.
|
4991 | */
|
4992 | export declare class ThisReceiver extends ImplicitReceiver {
|
4993 | visit(visitor: AstVisitor, context?: any): any;
|
4994 | }
|
4995 |
|
4996 | export declare class TmplAstBlockNode {
|
4997 | nameSpan: ParseSourceSpan;
|
4998 | sourceSpan: ParseSourceSpan;
|
4999 | startSourceSpan: ParseSourceSpan;
|
5000 | endSourceSpan: ParseSourceSpan | null;
|
5001 | constructor(nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null);
|
5002 | }
|
5003 |
|
5004 | export declare class TmplAstBoundAttribute implements TmplAstNode {
|
5005 | name: string;
|
5006 | type: BindingType;
|
5007 | securityContext: SecurityContext;
|
5008 | value: AST;
|
5009 | unit: string | null;
|
5010 | sourceSpan: ParseSourceSpan;
|
5011 | readonly keySpan: ParseSourceSpan;
|
5012 | valueSpan: ParseSourceSpan | undefined;
|
5013 | i18n: I18nMeta_2 | undefined;
|
5014 | constructor(name: string, type: BindingType, securityContext: SecurityContext, value: AST, unit: string | null, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan: ParseSourceSpan | undefined, i18n: I18nMeta_2 | undefined);
|
5015 | static fromBoundElementProperty(prop: BoundElementProperty, i18n?: I18nMeta_2): TmplAstBoundAttribute;
|
5016 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5017 | }
|
5018 |
|
5019 | export declare class TmplAstBoundDeferredTrigger extends TmplAstDeferredTrigger {
|
5020 | value: AST;
|
5021 | constructor(value: AST, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan | null, whenSourceSpan: ParseSourceSpan, hydrateSpan: ParseSourceSpan | null);
|
5022 | }
|
5023 |
|
5024 | export declare class TmplAstBoundEvent implements TmplAstNode {
|
5025 | name: string;
|
5026 | type: ParsedEventType;
|
5027 | handler: AST;
|
5028 | target: string | null;
|
5029 | phase: string | null;
|
5030 | sourceSpan: ParseSourceSpan;
|
5031 | handlerSpan: ParseSourceSpan;
|
5032 | readonly keySpan: ParseSourceSpan;
|
5033 | constructor(name: string, type: ParsedEventType, handler: AST, target: string | null, phase: string | null, sourceSpan: ParseSourceSpan, handlerSpan: ParseSourceSpan, keySpan: ParseSourceSpan);
|
5034 | static fromParsedEvent(event: ParsedEvent): TmplAstBoundEvent;
|
5035 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5036 | }
|
5037 |
|
5038 | export declare class TmplAstBoundText implements TmplAstNode {
|
5039 | value: AST;
|
5040 | sourceSpan: ParseSourceSpan;
|
5041 | i18n?: I18nMeta_2 | undefined;
|
5042 | constructor(value: AST, sourceSpan: ParseSourceSpan, i18n?: I18nMeta_2 | undefined);
|
5043 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5044 | }
|
5045 |
|
5046 | export declare class TmplAstContent implements TmplAstNode {
|
5047 | selector: string;
|
5048 | attributes: TmplAstTextAttribute[];
|
5049 | children: TmplAstNode[];
|
5050 | sourceSpan: ParseSourceSpan;
|
5051 | i18n?: I18nMeta_2 | undefined;
|
5052 | readonly name = "ng-content";
|
5053 | constructor(selector: string, attributes: TmplAstTextAttribute[], children: TmplAstNode[], sourceSpan: ParseSourceSpan, i18n?: I18nMeta_2 | undefined);
|
5054 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5055 | }
|
5056 |
|
5057 | export declare class TmplAstDeferredBlock extends TmplAstBlockNode implements TmplAstNode {
|
5058 | children: TmplAstNode[];
|
5059 | placeholder: TmplAstDeferredBlockPlaceholder | null;
|
5060 | loading: TmplAstDeferredBlockLoading | null;
|
5061 | error: TmplAstDeferredBlockError | null;
|
5062 | mainBlockSpan: ParseSourceSpan;
|
5063 | i18n?: I18nMeta_2 | undefined;
|
5064 | readonly triggers: Readonly<TmplAstDeferredBlockTriggers>;
|
5065 | readonly prefetchTriggers: Readonly<TmplAstDeferredBlockTriggers>;
|
5066 | readonly hydrateTriggers: Readonly<TmplAstDeferredBlockTriggers>;
|
5067 | private readonly definedTriggers;
|
5068 | private readonly definedPrefetchTriggers;
|
5069 | private readonly definedHydrateTriggers;
|
5070 | constructor(children: TmplAstNode[], triggers: TmplAstDeferredBlockTriggers, prefetchTriggers: TmplAstDeferredBlockTriggers, hydrateTriggers: TmplAstDeferredBlockTriggers, placeholder: TmplAstDeferredBlockPlaceholder | null, loading: TmplAstDeferredBlockLoading | null, error: TmplAstDeferredBlockError | null, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, mainBlockSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, i18n?: I18nMeta_2 | undefined);
|
5071 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5072 | visitAll(visitor: TmplAstVisitor<unknown>): void;
|
5073 | private visitTriggers;
|
5074 | }
|
5075 |
|
5076 | export declare class TmplAstDeferredBlockError extends TmplAstBlockNode implements TmplAstNode {
|
5077 | children: TmplAstNode[];
|
5078 | i18n?: I18nMeta_2 | undefined;
|
5079 | constructor(children: TmplAstNode[], nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, i18n?: I18nMeta_2 | undefined);
|
5080 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5081 | }
|
5082 |
|
5083 | export declare class TmplAstDeferredBlockLoading extends TmplAstBlockNode implements TmplAstNode {
|
5084 | children: TmplAstNode[];
|
5085 | afterTime: number | null;
|
5086 | minimumTime: number | null;
|
5087 | i18n?: I18nMeta_2 | undefined;
|
5088 | constructor(children: TmplAstNode[], afterTime: number | null, minimumTime: number | null, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, i18n?: I18nMeta_2 | undefined);
|
5089 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5090 | }
|
5091 |
|
5092 | export declare class TmplAstDeferredBlockPlaceholder extends TmplAstBlockNode implements TmplAstNode {
|
5093 | children: TmplAstNode[];
|
5094 | minimumTime: number | null;
|
5095 | i18n?: I18nMeta_2 | undefined;
|
5096 | constructor(children: TmplAstNode[], minimumTime: number | null, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, i18n?: I18nMeta_2 | undefined);
|
5097 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5098 | }
|
5099 |
|
5100 | export declare interface TmplAstDeferredBlockTriggers {
|
5101 | when?: TmplAstBoundDeferredTrigger;
|
5102 | idle?: TmplAstIdleDeferredTrigger;
|
5103 | immediate?: TmplAstImmediateDeferredTrigger;
|
5104 | hover?: TmplAstHoverDeferredTrigger;
|
5105 | timer?: TmplAstTimerDeferredTrigger;
|
5106 | interaction?: TmplAstInteractionDeferredTrigger;
|
5107 | viewport?: TmplAstViewportDeferredTrigger;
|
5108 | never?: TmplAstNeverDeferredTrigger;
|
5109 | }
|
5110 |
|
5111 | export declare abstract class TmplAstDeferredTrigger implements TmplAstNode {
|
5112 | nameSpan: ParseSourceSpan | null;
|
5113 | sourceSpan: ParseSourceSpan;
|
5114 | prefetchSpan: ParseSourceSpan | null;
|
5115 | whenOrOnSourceSpan: ParseSourceSpan | null;
|
5116 | hydrateSpan: ParseSourceSpan | null;
|
5117 | constructor(nameSpan: ParseSourceSpan | null, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan | null, whenOrOnSourceSpan: ParseSourceSpan | null, hydrateSpan: ParseSourceSpan | null);
|
5118 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5119 | }
|
5120 |
|
5121 | export declare class TmplAstElement implements TmplAstNode {
|
5122 | name: string;
|
5123 | attributes: TmplAstTextAttribute[];
|
5124 | inputs: TmplAstBoundAttribute[];
|
5125 | outputs: TmplAstBoundEvent[];
|
5126 | children: TmplAstNode[];
|
5127 | references: TmplAstReference[];
|
5128 | sourceSpan: ParseSourceSpan;
|
5129 | startSourceSpan: ParseSourceSpan;
|
5130 | endSourceSpan: ParseSourceSpan | null;
|
5131 | i18n?: I18nMeta_2 | undefined;
|
5132 | constructor(name: string, attributes: TmplAstTextAttribute[], inputs: TmplAstBoundAttribute[], outputs: TmplAstBoundEvent[], children: TmplAstNode[], references: TmplAstReference[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, i18n?: I18nMeta_2 | undefined);
|
5133 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5134 | }
|
5135 |
|
5136 | export declare class TmplAstForLoopBlock extends TmplAstBlockNode implements TmplAstNode {
|
5137 | item: TmplAstVariable;
|
5138 | expression: ASTWithSource;
|
5139 | trackBy: ASTWithSource;
|
5140 | trackKeywordSpan: ParseSourceSpan;
|
5141 | contextVariables: TmplAstVariable[];
|
5142 | children: TmplAstNode[];
|
5143 | empty: TmplAstForLoopBlockEmpty | null;
|
5144 | mainBlockSpan: ParseSourceSpan;
|
5145 | i18n?: I18nMeta_2 | undefined;
|
5146 | constructor(item: TmplAstVariable, expression: ASTWithSource, trackBy: ASTWithSource, trackKeywordSpan: ParseSourceSpan, contextVariables: TmplAstVariable[], children: TmplAstNode[], empty: TmplAstForLoopBlockEmpty | null, sourceSpan: ParseSourceSpan, mainBlockSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2 | undefined);
|
5147 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5148 | }
|
5149 |
|
5150 | export declare class TmplAstForLoopBlockEmpty extends TmplAstBlockNode implements TmplAstNode {
|
5151 | children: TmplAstNode[];
|
5152 | i18n?: I18nMeta_2 | undefined;
|
5153 | constructor(children: TmplAstNode[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2 | undefined);
|
5154 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5155 | }
|
5156 |
|
5157 | export declare class TmplAstHoverDeferredTrigger extends TmplAstDeferredTrigger {
|
5158 | reference: string | null;
|
5159 | constructor(reference: string | null, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan | null, onSourceSpan: ParseSourceSpan | null, hydrateSpan: ParseSourceSpan | null);
|
5160 | }
|
5161 |
|
5162 | export declare class TmplAstIcu implements TmplAstNode {
|
5163 | vars: {
|
5164 | [name: string]: TmplAstBoundText;
|
5165 | };
|
5166 | placeholders: {
|
5167 | [name: string]: TmplAstText | TmplAstBoundText;
|
5168 | };
|
5169 | sourceSpan: ParseSourceSpan;
|
5170 | i18n?: I18nMeta_2 | undefined;
|
5171 | constructor(vars: {
|
5172 | [name: string]: TmplAstBoundText;
|
5173 | }, placeholders: {
|
5174 | [name: string]: TmplAstText | TmplAstBoundText;
|
5175 | }, sourceSpan: ParseSourceSpan, i18n?: I18nMeta_2 | undefined);
|
5176 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5177 | }
|
5178 |
|
5179 | export declare class TmplAstIdleDeferredTrigger extends TmplAstDeferredTrigger {
|
5180 | }
|
5181 |
|
5182 | export declare class TmplAstIfBlock extends TmplAstBlockNode implements TmplAstNode {
|
5183 | branches: TmplAstIfBlockBranch[];
|
5184 | constructor(branches: TmplAstIfBlockBranch[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, nameSpan: ParseSourceSpan);
|
5185 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5186 | }
|
5187 |
|
5188 | export declare class TmplAstIfBlockBranch extends TmplAstBlockNode implements TmplAstNode {
|
5189 | expression: AST | null;
|
5190 | children: TmplAstNode[];
|
5191 | expressionAlias: TmplAstVariable | null;
|
5192 | i18n?: I18nMeta_2 | undefined;
|
5193 | constructor(expression: AST | null, children: TmplAstNode[], expressionAlias: TmplAstVariable | null, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2 | undefined);
|
5194 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5195 | }
|
5196 |
|
5197 | export declare class TmplAstImmediateDeferredTrigger extends TmplAstDeferredTrigger {
|
5198 | }
|
5199 |
|
5200 | export declare class TmplAstInteractionDeferredTrigger extends TmplAstDeferredTrigger {
|
5201 | reference: string | null;
|
5202 | constructor(reference: string | null, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan | null, onSourceSpan: ParseSourceSpan | null, hydrateSpan: ParseSourceSpan | null);
|
5203 | }
|
5204 |
|
5205 | export declare class TmplAstLetDeclaration implements TmplAstNode {
|
5206 | name: string;
|
5207 | value: AST;
|
5208 | sourceSpan: ParseSourceSpan;
|
5209 | nameSpan: ParseSourceSpan;
|
5210 | valueSpan: ParseSourceSpan;
|
5211 | constructor(name: string, value: AST, sourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, valueSpan: ParseSourceSpan);
|
5212 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5213 | }
|
5214 |
|
5215 | export declare class TmplAstNeverDeferredTrigger extends TmplAstDeferredTrigger {
|
5216 | }
|
5217 |
|
5218 | export declare interface TmplAstNode {
|
5219 | sourceSpan: ParseSourceSpan;
|
5220 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5221 | }
|
5222 |
|
5223 | export declare class TmplAstRecursiveVisitor implements TmplAstVisitor<void> {
|
5224 | visitElement(element: TmplAstElement): void;
|
5225 | visitTemplate(template: TmplAstTemplate): void;
|
5226 | visitDeferredBlock(deferred: TmplAstDeferredBlock): void;
|
5227 | visitDeferredBlockPlaceholder(block: TmplAstDeferredBlockPlaceholder): void;
|
5228 | visitDeferredBlockError(block: TmplAstDeferredBlockError): void;
|
5229 | visitDeferredBlockLoading(block: TmplAstDeferredBlockLoading): void;
|
5230 | visitSwitchBlock(block: TmplAstSwitchBlock): void;
|
5231 | visitSwitchBlockCase(block: TmplAstSwitchBlockCase): void;
|
5232 | visitForLoopBlock(block: TmplAstForLoopBlock): void;
|
5233 | visitForLoopBlockEmpty(block: TmplAstForLoopBlockEmpty): void;
|
5234 | visitIfBlock(block: TmplAstIfBlock): void;
|
5235 | visitIfBlockBranch(block: TmplAstIfBlockBranch): void;
|
5236 | visitContent(content: TmplAstContent): void;
|
5237 | visitVariable(variable: TmplAstVariable): void;
|
5238 | visitReference(reference: TmplAstReference): void;
|
5239 | visitTextAttribute(attribute: TmplAstTextAttribute): void;
|
5240 | visitBoundAttribute(attribute: TmplAstBoundAttribute): void;
|
5241 | visitBoundEvent(attribute: TmplAstBoundEvent): void;
|
5242 | visitText(text: TmplAstText): void;
|
5243 | visitBoundText(text: TmplAstBoundText): void;
|
5244 | visitIcu(icu: TmplAstIcu): void;
|
5245 | visitDeferredTrigger(trigger: TmplAstDeferredTrigger): void;
|
5246 | visitUnknownBlock(block: TmplAstUnknownBlock): void;
|
5247 | visitLetDeclaration(decl: TmplAstLetDeclaration): void;
|
5248 | }
|
5249 |
|
5250 | export declare class TmplAstReference implements TmplAstNode {
|
5251 | name: string;
|
5252 | value: string;
|
5253 | sourceSpan: ParseSourceSpan;
|
5254 | readonly keySpan: ParseSourceSpan;
|
5255 | valueSpan?: ParseSourceSpan | undefined;
|
5256 | constructor(name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan?: ParseSourceSpan | undefined);
|
5257 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5258 | }
|
5259 |
|
5260 | export declare class TmplAstSwitchBlock extends TmplAstBlockNode implements TmplAstNode {
|
5261 | expression: AST;
|
5262 | cases: TmplAstSwitchBlockCase[];
|
5263 | /**
|
5264 | * These blocks are only captured to allow for autocompletion in the language service. They
|
5265 | * aren't meant to be processed in any other way.
|
5266 | */
|
5267 | unknownBlocks: TmplAstUnknownBlock[];
|
5268 | constructor(expression: AST, cases: TmplAstSwitchBlockCase[],
|
5269 | |
5270 |
|
5271 |
|
5272 |
|
5273 | unknownBlocks: TmplAstUnknownBlock[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, nameSpan: ParseSourceSpan);
|
5274 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5275 | }
|
5276 |
|
5277 | export declare class TmplAstSwitchBlockCase extends TmplAstBlockNode implements TmplAstNode {
|
5278 | expression: AST | null;
|
5279 | children: TmplAstNode[];
|
5280 | i18n?: I18nMeta_2 | undefined;
|
5281 | constructor(expression: AST | null, children: TmplAstNode[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2 | undefined);
|
5282 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5283 | }
|
5284 |
|
5285 | export declare class TmplAstTemplate implements TmplAstNode {
|
5286 | tagName: string | null;
|
5287 | attributes: TmplAstTextAttribute[];
|
5288 | inputs: TmplAstBoundAttribute[];
|
5289 | outputs: TmplAstBoundEvent[];
|
5290 | templateAttrs: (TmplAstBoundAttribute | TmplAstTextAttribute)[];
|
5291 | children: TmplAstNode[];
|
5292 | references: TmplAstReference[];
|
5293 | variables: TmplAstVariable[];
|
5294 | sourceSpan: ParseSourceSpan;
|
5295 | startSourceSpan: ParseSourceSpan;
|
5296 | endSourceSpan: ParseSourceSpan | null;
|
5297 | i18n?: I18nMeta_2 | undefined;
|
5298 | constructor(tagName: string | null, attributes: TmplAstTextAttribute[], inputs: TmplAstBoundAttribute[], outputs: TmplAstBoundEvent[], templateAttrs: (TmplAstBoundAttribute | TmplAstTextAttribute)[], children: TmplAstNode[], references: TmplAstReference[], variables: TmplAstVariable[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, i18n?: I18nMeta_2 | undefined);
|
5299 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5300 | }
|
5301 |
|
5302 | export declare class TmplAstText implements TmplAstNode {
|
5303 | value: string;
|
5304 | sourceSpan: ParseSourceSpan;
|
5305 | constructor(value: string, sourceSpan: ParseSourceSpan);
|
5306 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5307 | }
|
5308 |
|
5309 | /**
|
5310 | * Represents a text attribute in the template.
|
5311 | *
|
5312 | * `valueSpan` may not be present in cases where there is no value `<div a></div>`.
|
5313 | * `keySpan` may also not be present for synthetic attributes from ICU expansions.
|
5314 | */
|
5315 | export declare class TmplAstTextAttribute implements TmplAstNode {
|
5316 | name: string;
|
5317 | value: string;
|
5318 | sourceSpan: ParseSourceSpan;
|
5319 | readonly keySpan: ParseSourceSpan | undefined;
|
5320 | valueSpan?: ParseSourceSpan | undefined;
|
5321 | i18n?: I18nMeta_2 | undefined;
|
5322 | constructor(name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan | undefined, valueSpan?: ParseSourceSpan | undefined, i18n?: I18nMeta_2 | undefined);
|
5323 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5324 | }
|
5325 |
|
5326 | export declare class TmplAstTimerDeferredTrigger extends TmplAstDeferredTrigger {
|
5327 | delay: number;
|
5328 | constructor(delay: number, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan | null, onSourceSpan: ParseSourceSpan | null, hydrateSpan: ParseSourceSpan | null);
|
5329 | }
|
5330 |
|
5331 | export declare class TmplAstUnknownBlock implements TmplAstNode {
|
5332 | name: string;
|
5333 | sourceSpan: ParseSourceSpan;
|
5334 | nameSpan: ParseSourceSpan;
|
5335 | constructor(name: string, sourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan);
|
5336 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5337 | }
|
5338 |
|
5339 | export declare class TmplAstVariable implements TmplAstNode {
|
5340 | name: string;
|
5341 | value: string;
|
5342 | sourceSpan: ParseSourceSpan;
|
5343 | readonly keySpan: ParseSourceSpan;
|
5344 | valueSpan?: ParseSourceSpan | undefined;
|
5345 | constructor(name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan, valueSpan?: ParseSourceSpan | undefined);
|
5346 | visit<Result>(visitor: TmplAstVisitor<Result>): Result;
|
5347 | }
|
5348 |
|
5349 | export declare class TmplAstViewportDeferredTrigger extends TmplAstDeferredTrigger {
|
5350 | reference: string | null;
|
5351 | constructor(reference: string | null, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, prefetchSpan: ParseSourceSpan | null, onSourceSpan: ParseSourceSpan | null, hydrateSpan: ParseSourceSpan | null);
|
5352 | }
|
5353 |
|
5354 | export declare function tmplAstVisitAll<Result>(visitor: TmplAstVisitor<Result>, nodes: TmplAstNode[]): Result[];
|
5355 |
|
5356 | export declare interface TmplAstVisitor<Result = any> {
|
5357 | visit?(node: TmplAstNode): Result;
|
5358 | visitElement(element: TmplAstElement): Result;
|
5359 | visitTemplate(template: TmplAstTemplate): Result;
|
5360 | visitContent(content: TmplAstContent): Result;
|
5361 | visitVariable(variable: TmplAstVariable): Result;
|
5362 | visitReference(reference: TmplAstReference): Result;
|
5363 | visitTextAttribute(attribute: TmplAstTextAttribute): Result;
|
5364 | visitBoundAttribute(attribute: TmplAstBoundAttribute): Result;
|
5365 | visitBoundEvent(attribute: TmplAstBoundEvent): Result;
|
5366 | visitText(text: TmplAstText): Result;
|
5367 | visitBoundText(text: TmplAstBoundText): Result;
|
5368 | visitIcu(icu: TmplAstIcu): Result;
|
5369 | visitDeferredBlock(deferred: TmplAstDeferredBlock): Result;
|
5370 | visitDeferredBlockPlaceholder(block: TmplAstDeferredBlockPlaceholder): Result;
|
5371 | visitDeferredBlockError(block: TmplAstDeferredBlockError): Result;
|
5372 | visitDeferredBlockLoading(block: TmplAstDeferredBlockLoading): Result;
|
5373 | visitDeferredTrigger(trigger: TmplAstDeferredTrigger): Result;
|
5374 | visitSwitchBlock(block: TmplAstSwitchBlock): Result;
|
5375 | visitSwitchBlockCase(block: TmplAstSwitchBlockCase): Result;
|
5376 | visitForLoopBlock(block: TmplAstForLoopBlock): Result;
|
5377 | visitForLoopBlockEmpty(block: TmplAstForLoopBlockEmpty): Result;
|
5378 | visitIfBlock(block: TmplAstIfBlock): Result;
|
5379 | visitIfBlockBranch(block: TmplAstIfBlockBranch): Result;
|
5380 | visitUnknownBlock(block: TmplAstUnknownBlock): Result;
|
5381 | visitLetDeclaration(decl: TmplAstLetDeclaration): Result;
|
5382 | }
|
5383 |
|
5384 | export declare class Token {
|
5385 | index: number;
|
5386 | end: number;
|
5387 | type: TokenType;
|
5388 | numValue: number;
|
5389 | strValue: string;
|
5390 | constructor(index: number, end: number, type: TokenType, numValue: number, strValue: string);
|
5391 | isCharacter(code: number): boolean;
|
5392 | isNumber(): boolean;
|
5393 | isString(): boolean;
|
5394 | isOperator(operator: string): boolean;
|
5395 | isIdentifier(): boolean;
|
5396 | isPrivateIdentifier(): boolean;
|
5397 | isKeyword(): boolean;
|
5398 | isKeywordLet(): boolean;
|
5399 | isKeywordAs(): boolean;
|
5400 | isKeywordNull(): boolean;
|
5401 | isKeywordUndefined(): boolean;
|
5402 | isKeywordTrue(): boolean;
|
5403 | isKeywordFalse(): boolean;
|
5404 | isKeywordThis(): boolean;
|
5405 | isKeywordTypeof(): boolean;
|
5406 | isError(): boolean;
|
5407 | toNumber(): number;
|
5408 | toString(): string | null;
|
5409 | }
|
5410 |
|
5411 | declare interface TokenBase {
|
5412 | type: LexerTokenType;
|
5413 | parts: string[];
|
5414 | sourceSpan: ParseSourceSpan;
|
5415 | }
|
5416 |
|
5417 | /**
|
5418 | * Options that modify how the text is tokenized.
|
5419 | */
|
5420 | declare interface TokenizeOptions {
|
5421 | /** Whether to tokenize ICU messages (considered as text nodes when false). */
|
5422 | tokenizeExpansionForms?: boolean;
|
5423 | /** How to tokenize interpolation markers. */
|
5424 | interpolationConfig?: InterpolationConfig;
|
5425 | /**
|
5426 | * The start and end point of the text to parse within the `source` string.
|
5427 | * The entire `source` string is parsed if this is not provided.
|
5428 | * */
|
5429 | range?: LexerRange;
|
5430 | /**
|
5431 | * If this text is stored in a JavaScript string, then we have to deal with escape sequences.
|
5432 | *
|
5433 | * **Example 1:**
|
5434 | *
|
5435 | * ```
|
5436 | * "abc\"def\nghi"
|
5437 | * ```
|
5438 | *
|
5439 | * - The `\"` must be converted to `"`.
|
5440 | * - The `\n` must be converted to a new line character in a token,
|
5441 | * but it should not increment the current line for source mapping.
|
5442 | *
|
5443 | * **Example 2:**
|
5444 | *
|
5445 | * ```
|
5446 | * "abc\
|
5447 | * def"
|
5448 | * ```
|
5449 | *
|
5450 | * The line continuation (`\` followed by a newline) should be removed from a token
|
5451 | * but the new line should increment the current line for source mapping.
|
5452 | */
|
5453 | escapedString?: boolean;
|
5454 | /**
|
5455 | * If this text is stored in an external template (e.g. via `templateUrl`) then we need to decide
|
5456 | * whether or not to normalize the line-endings (from `\r\n` to `\n`) when processing ICU
|
5457 | * expressions.
|
5458 | *
|
5459 | * If `true` then we will normalize ICU expression line endings.
|
5460 | * The default is `false`, but this will be switched in a future major release.
|
5461 | */
|
5462 | i18nNormalizeLineEndingsInICUs?: boolean;
|
5463 | /**
|
5464 | * An array of characters that should be considered as leading trivia.
|
5465 | * Leading trivia are characters that are not important to the developer, and so should not be
|
5466 | * included in source-map segments. A common example is whitespace.
|
5467 | */
|
5468 | leadingTriviaChars?: string[];
|
5469 | /**
|
5470 | * If true, do not convert CRLF to LF.
|
5471 | */
|
5472 | preserveLineEndings?: boolean;
|
5473 | /**
|
5474 | * Whether to tokenize @ block syntax. Otherwise considered text,
|
5475 | * or ICU tokens if `tokenizeExpansionForms` is enabled.
|
5476 | */
|
5477 | tokenizeBlocks?: boolean;
|
5478 | /**
|
5479 | * Whether to tokenize the `@let` syntax. Otherwise will be considered either
|
5480 | * text or an incomplete block, depending on whether `tokenizeBlocks` is enabled.
|
5481 | */
|
5482 | tokenizeLet?: boolean;
|
5483 | }
|
5484 |
|
5485 |
|
5486 | export declare enum TokenType {
|
5487 | Character = 0,
|
5488 | Identifier = 1,
|
5489 | PrivateIdentifier = 2,
|
5490 | Keyword = 3,
|
5491 | String = 4,
|
5492 | Operator = 5,
|
5493 | Number = 6,
|
5494 | Error = 7
|
5495 | }
|
5496 |
|
5497 | export declare class TransplantedType<T> extends Type {
|
5498 | readonly type: T;
|
5499 | constructor(type: T, modifiers?: TypeModifier);
|
5500 | visitType(visitor: TypeVisitor, context: any): any;
|
5501 | }
|
5502 |
|
5503 | declare function transplantedType<T>(type: T, typeModifiers?: TypeModifier): TransplantedType<T>;
|
5504 |
|
5505 | export declare class TreeError extends ParseError {
|
5506 | elementName: string | null;
|
5507 | static create(elementName: string | null, span: ParseSourceSpan, msg: string): TreeError;
|
5508 | constructor(elementName: string | null, span: ParseSourceSpan, msg: string);
|
5509 | }
|
5510 |
|
5511 | export declare abstract class Type {
|
5512 | modifiers: TypeModifier;
|
5513 | constructor(modifiers?: TypeModifier);
|
5514 | abstract visitType(visitor: TypeVisitor, context: any): any;
|
5515 | hasModifier(modifier: TypeModifier): boolean;
|
5516 | }
|
5517 |
|
5518 | declare interface Type_2 extends Function {
|
5519 | new (...args: any[]): any;
|
5520 | }
|
5521 |
|
5522 | declare const Type_2: FunctionConstructor;
|
5523 |
|
5524 | declare const TYPED_NULL_EXPR: LiteralExpr;
|
5525 |
|
5526 | export declare enum TypeModifier {
|
5527 | None = 0,
|
5528 | Const = 1
|
5529 | }
|
5530 |
|
5531 | export declare class TypeofExpr extends Expression {
|
5532 | expr: Expression;
|
5533 | constructor(expr: Expression, type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
5534 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
5535 | isEquivalent(e: Expression): boolean;
|
5536 | isConstant(): boolean;
|
5537 | clone(): TypeofExpr;
|
5538 | }
|
5539 |
|
5540 | declare function typeofExpr(expr: Expression): TypeofExpr;
|
5541 |
|
5542 | export declare class TypeofExpression extends AST {
|
5543 | expression: AST;
|
5544 | constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expression: AST);
|
5545 | visit(visitor: AstVisitor, context?: any): any;
|
5546 | }
|
5547 |
|
5548 | export declare interface TypeVisitor {
|
5549 | visitBuiltinType(type: BuiltinType, context: any): any;
|
5550 | visitExpressionType(type: ExpressionType, context: any): any;
|
5551 | visitArrayType(type: ArrayType, context: any): any;
|
5552 | visitMapType(type: MapType, context: any): any;
|
5553 | visitTransplantedType(type: TransplantedType<unknown>, context: any): any;
|
5554 | }
|
5555 |
|
5556 | /**
|
5557 | * For backwards compatibility reasons, `Unary` inherits from `Binary` and mimics the binary AST
|
5558 | * node that was originally used. This inheritance relation can be deleted in some future major,
|
5559 | * after consumers have been given a chance to fully support Unary.
|
5560 | */
|
5561 | export declare class Unary extends Binary {
|
5562 | operator: string;
|
5563 | expr: AST;
|
5564 | left: never;
|
5565 | right: never;
|
5566 | operation: never;
|
5567 | /**
|
5568 | * Creates a unary minus expression "-x", represented as `Binary` using "0 - x".
|
5569 | */
|
5570 | static createMinus(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expr: AST): Unary;
|
5571 | /**
|
5572 | * Creates a unary plus expression "+x", represented as `Binary` using "x - 0".
|
5573 | */
|
5574 | static createPlus(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expr: AST): Unary;
|
5575 | /**
|
5576 | * During the deprecation period this constructor is private, to avoid consumers from creating
|
5577 | * a `Unary` with the fallback properties for `Binary`.
|
5578 | */
|
5579 | private constructor();
|
5580 | visit(visitor: AstVisitor, context?: any): any;
|
5581 | }
|
5582 |
|
5583 | declare function unary(operator: UnaryOperator, expr: Expression, type?: Type, sourceSpan?: ParseSourceSpan | null): UnaryOperatorExpr;
|
5584 |
|
5585 | export declare enum UnaryOperator {
|
5586 | Minus = 0,
|
5587 | Plus = 1
|
5588 | }
|
5589 |
|
5590 | export declare class UnaryOperatorExpr extends Expression {
|
5591 | operator: UnaryOperator;
|
5592 | expr: Expression;
|
5593 | parens: boolean;
|
5594 | constructor(operator: UnaryOperator, expr: Expression, type?: Type | null, sourceSpan?: ParseSourceSpan | null, parens?: boolean);
|
5595 | isEquivalent(e: Expression): boolean;
|
5596 | isConstant(): boolean;
|
5597 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
5598 | clone(): UnaryOperatorExpr;
|
5599 | }
|
5600 |
|
5601 | declare function variable(name: string, type?: Type | null, sourceSpan?: ParseSourceSpan | null): ReadVarExpr;
|
5602 |
|
5603 | export declare class VariableBinding {
|
5604 | readonly sourceSpan: AbsoluteSourceSpan;
|
5605 | readonly key: TemplateBindingIdentifier;
|
5606 | readonly value: TemplateBindingIdentifier | null;
|
5607 | /**
|
5608 | * @param sourceSpan entire span of the binding.
|
5609 | * @param key name of the LHS along with its span.
|
5610 | * @param value optional value for the RHS along with its span.
|
5611 | */
|
5612 | constructor(sourceSpan: AbsoluteSourceSpan, key: TemplateBindingIdentifier, value: TemplateBindingIdentifier | null);
|
5613 | }
|
5614 |
|
5615 | /**
|
5616 | * Verifies host bindings and returns the list of errors (if any). Empty array indicates that a
|
5617 | * given set of host bindings has no errors.
|
5618 | *
|
5619 | * @param bindings set of host bindings to verify.
|
5620 | * @param sourceSpan source span where host bindings were defined.
|
5621 | * @returns array of errors associated with a given set of host bindings.
|
5622 | */
|
5623 | export declare function verifyHostBindings(bindings: ParsedHostBindings, sourceSpan: ParseSourceSpan): ParseError[];
|
5624 |
|
5625 | export declare const VERSION: Version;
|
5626 |
|
5627 | export declare class Version {
|
5628 | full: string;
|
5629 | readonly major: string;
|
5630 | readonly minor: string;
|
5631 | readonly patch: string;
|
5632 | constructor(full: string);
|
5633 | }
|
5634 |
|
5635 | export declare enum ViewEncapsulation {
|
5636 | Emulated = 0,
|
5637 | None = 2,
|
5638 | ShadowDom = 3
|
5639 | }
|
5640 |
|
5641 | export declare function visitAll(visitor: Visitor, nodes: Node_2[], context?: any): any[];
|
5642 |
|
5643 | export declare interface Visitor {
|
5644 | visit?(node: Node_2, context: any): any;
|
5645 | visitElement(element: Element_2, context: any): any;
|
5646 | visitAttribute(attribute: Attribute, context: any): any;
|
5647 | visitText(text: Text_2, context: any): any;
|
5648 | visitComment(comment: Comment_2, context: any): any;
|
5649 | visitExpansion(expansion: Expansion, context: any): any;
|
5650 | visitExpansionCase(expansionCase: ExpansionCase, context: any): any;
|
5651 | visitBlock(block: Block, context: any): any;
|
5652 | visitBlockParameter(parameter: BlockParameter, context: any): any;
|
5653 | visitLetDeclaration(decl: LetDeclaration, context: any): any;
|
5654 | }
|
5655 |
|
5656 | declare interface Visitor_2 {
|
5657 | visitText(text: Text_3, context?: any): any;
|
5658 | visitContainer(container: Container, context?: any): any;
|
5659 | visitIcu(icu: Icu, context?: any): any;
|
5660 | visitTagPlaceholder(ph: TagPlaceholder, context?: any): any;
|
5661 | visitPlaceholder(ph: Placeholder, context?: any): any;
|
5662 | visitIcuPlaceholder(ph: IcuPlaceholder, context?: any): any;
|
5663 | visitBlockPlaceholder(ph: BlockPlaceholder, context?: any): any;
|
5664 | }
|
5665 |
|
5666 | export declare class WrappedNodeExpr<T> extends Expression {
|
5667 | node: T;
|
5668 | constructor(node: T, type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
5669 | isEquivalent(e: Expression): boolean;
|
5670 | isConstant(): boolean;
|
5671 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
5672 | clone(): WrappedNodeExpr<T>;
|
5673 | }
|
5674 |
|
5675 | export declare class WriteKeyExpr extends Expression {
|
5676 | receiver: Expression;
|
5677 | index: Expression;
|
5678 | value: Expression;
|
5679 | constructor(receiver: Expression, index: Expression, value: Expression, type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
5680 | isEquivalent(e: Expression): boolean;
|
5681 | isConstant(): boolean;
|
5682 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
5683 | clone(): WriteKeyExpr;
|
5684 | }
|
5685 |
|
5686 | export declare class WritePropExpr extends Expression {
|
5687 | receiver: Expression;
|
5688 | name: string;
|
5689 | value: Expression;
|
5690 | constructor(receiver: Expression, name: string, value: Expression, type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
5691 | isEquivalent(e: Expression): boolean;
|
5692 | isConstant(): boolean;
|
5693 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
5694 | clone(): WritePropExpr;
|
5695 | }
|
5696 |
|
5697 | export declare class WriteVarExpr extends Expression {
|
5698 | name: string;
|
5699 | value: Expression;
|
5700 | constructor(name: string, value: Expression, type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
5701 | isEquivalent(e: Expression): boolean;
|
5702 | isConstant(): boolean;
|
5703 | visitExpression(visitor: ExpressionVisitor, context: any): any;
|
5704 | clone(): WriteVarExpr;
|
5705 | toDeclStmt(type?: Type | null, modifiers?: StmtModifier): DeclareVarStmt;
|
5706 | toConstDecl(): DeclareVarStmt;
|
5707 | }
|
5708 |
|
5709 | export declare class Xliff extends Serializer {
|
5710 | write(messages: i18n.Message[], locale: string | null): string;
|
5711 | load(content: string, url: string): {
|
5712 | locale: string;
|
5713 | i18nNodesByMsgId: {
|
5714 | [msgId: string]: i18n.Node[];
|
5715 | };
|
5716 | };
|
5717 | digest(message: i18n.Message): string;
|
5718 | }
|
5719 |
|
5720 | export declare class Xliff2 extends Serializer {
|
5721 | write(messages: i18n.Message[], locale: string | null): string;
|
5722 | load(content: string, url: string): {
|
5723 | locale: string;
|
5724 | i18nNodesByMsgId: {
|
5725 | [msgId: string]: i18n.Node[];
|
5726 | };
|
5727 | };
|
5728 | digest(message: i18n.Message): string;
|
5729 | }
|
5730 |
|
5731 | export declare class Xmb extends Serializer {
|
5732 | write(messages: i18n.Message[], locale: string | null): string;
|
5733 | load(content: string, url: string): {
|
5734 | locale: string;
|
5735 | i18nNodesByMsgId: {
|
5736 | [msgId: string]: i18n.Node[];
|
5737 | };
|
5738 | };
|
5739 | digest(message: i18n.Message): string;
|
5740 | createNameMapper(message: i18n.Message): PlaceholderMapper;
|
5741 | }
|
5742 |
|
5743 | export declare class XmlParser extends Parser_2 {
|
5744 | constructor();
|
5745 | parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult;
|
5746 | }
|
5747 |
|
5748 | export declare class Xtb extends Serializer {
|
5749 | write(messages: i18n.Message[], locale: string | null): string;
|
5750 | load(content: string, url: string): {
|
5751 | locale: string;
|
5752 | i18nNodesByMsgId: {
|
5753 | [msgId: string]: i18n.Node[];
|
5754 | };
|
5755 | };
|
5756 | digest(message: i18n.Message): string;
|
5757 | createNameMapper(message: i18n.Message): PlaceholderMapper;
|
5758 | }
|
5759 |
|
5760 | export { }
|
5761 |
|
\ | No newline at end of file |