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