@angular/compiler 19.1.5 → 19.2.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/compiler.mjs +344 -106
- package/fesm2022/compiler.mjs.map +1 -1
- package/index.d.ts +63 -25
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.
|
|
2
|
+
* @license Angular v19.2.0-next.0
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -93,6 +93,8 @@ export declare interface AstVisitor {
|
|
|
93
93
|
visitSafeKeyedRead(ast: SafeKeyedRead, context: any): any;
|
|
94
94
|
visitCall(ast: Call, context: any): any;
|
|
95
95
|
visitSafeCall(ast: SafeCall, context: any): any;
|
|
96
|
+
visitTemplateLiteral(ast: TemplateLiteral, context: any): any;
|
|
97
|
+
visitTemplateLiteralElement(ast: TemplateLiteralElement, context: any): any;
|
|
96
98
|
visitASTWithSource?(ast: ASTWithSource, context: any): any;
|
|
97
99
|
/**
|
|
98
100
|
* This function is optionally defined to allow classes that implement this
|
|
@@ -1319,7 +1321,9 @@ export declare interface ExpressionVisitor {
|
|
|
1319
1321
|
visitWriteKeyExpr(expr: WriteKeyExpr, context: any): any;
|
|
1320
1322
|
visitWritePropExpr(expr: WritePropExpr, context: any): any;
|
|
1321
1323
|
visitInvokeFunctionExpr(ast: InvokeFunctionExpr, context: any): any;
|
|
1322
|
-
|
|
1324
|
+
visitTaggedTemplateLiteralExpr(ast: TaggedTemplateLiteralExpr, context: any): any;
|
|
1325
|
+
visitTemplateLiteralExpr(ast: TemplateLiteralExpr, context: any): any;
|
|
1326
|
+
visitTemplateLiteralElementExpr(ast: TemplateLiteralElementExpr, context: any): any;
|
|
1323
1327
|
visitInstantiateExpr(ast: InstantiateExpr, context: any): any;
|
|
1324
1328
|
visitLiteralExpr(ast: LiteralExpr, context: any): any;
|
|
1325
1329
|
visitLocalizedString(ast: LocalizedString, context: any): any;
|
|
@@ -2192,11 +2196,11 @@ declare namespace outputAst {
|
|
|
2192
2196
|
WriteKeyExpr,
|
|
2193
2197
|
WritePropExpr,
|
|
2194
2198
|
InvokeFunctionExpr,
|
|
2195
|
-
|
|
2199
|
+
TaggedTemplateLiteralExpr,
|
|
2196
2200
|
InstantiateExpr,
|
|
2197
2201
|
LiteralExpr,
|
|
2198
|
-
|
|
2199
|
-
|
|
2202
|
+
TemplateLiteralExpr,
|
|
2203
|
+
TemplateLiteralElementExpr,
|
|
2200
2204
|
LiteralPiece,
|
|
2201
2205
|
PlaceholderPiece,
|
|
2202
2206
|
MessagePiece,
|
|
@@ -3700,12 +3704,9 @@ export declare interface R3HmrMetadata {
|
|
|
3700
3704
|
/**
|
|
3701
3705
|
* HMR update functions cannot contain imports so any locals the generated code depends on
|
|
3702
3706
|
* (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
|
|
3707
|
+
* as function parameters. This array contains the names of those local symbols.
|
|
3704
3708
|
*/
|
|
3705
|
-
localDependencies:
|
|
3706
|
-
name: string;
|
|
3707
|
-
runtimeRepresentation: outputAst.Expression;
|
|
3708
|
-
}[];
|
|
3709
|
+
localDependencies: string[];
|
|
3709
3710
|
}
|
|
3710
3711
|
|
|
3711
3712
|
/** HMR dependency on a namespace import. */
|
|
@@ -4404,6 +4405,8 @@ export declare class RecursiveAstVisitor implements AstVisitor {
|
|
|
4404
4405
|
visitSafeKeyedRead(ast: SafeKeyedRead, context: any): any;
|
|
4405
4406
|
visitCall(ast: Call, context: any): any;
|
|
4406
4407
|
visitSafeCall(ast: SafeCall, context: any): any;
|
|
4408
|
+
visitTemplateLiteral(ast: TemplateLiteral, context: any): void;
|
|
4409
|
+
visitTemplateLiteralElement(ast: TemplateLiteralElement, context: any): void;
|
|
4407
4410
|
visitAll(asts: AST[], context: any): any;
|
|
4408
4411
|
}
|
|
4409
4412
|
|
|
@@ -4423,7 +4426,7 @@ declare class RecursiveAstVisitor_2 implements StatementVisitor, ExpressionVisit
|
|
|
4423
4426
|
visitWritePropExpr(ast: WritePropExpr, context: any): any;
|
|
4424
4427
|
visitDynamicImportExpr(ast: DynamicImportExpr, context: any): any;
|
|
4425
4428
|
visitInvokeFunctionExpr(ast: InvokeFunctionExpr, context: any): any;
|
|
4426
|
-
|
|
4429
|
+
visitTaggedTemplateLiteralExpr(ast: TaggedTemplateLiteralExpr, context: any): any;
|
|
4427
4430
|
visitInstantiateExpr(ast: InstantiateExpr, context: any): any;
|
|
4428
4431
|
visitLiteralExpr(ast: LiteralExpr, context: any): any;
|
|
4429
4432
|
visitLocalizedString(ast: LocalizedString, context: any): any;
|
|
@@ -4439,6 +4442,8 @@ declare class RecursiveAstVisitor_2 implements StatementVisitor, ExpressionVisit
|
|
|
4439
4442
|
visitLiteralArrayExpr(ast: LiteralArrayExpr, context: any): any;
|
|
4440
4443
|
visitLiteralMapExpr(ast: LiteralMapExpr, context: any): any;
|
|
4441
4444
|
visitCommaExpr(ast: CommaExpr, context: any): any;
|
|
4445
|
+
visitTemplateLiteralExpr(ast: TemplateLiteralExpr, context: any): any;
|
|
4446
|
+
visitTemplateLiteralElementExpr(ast: TemplateLiteralElementExpr, context: any): any;
|
|
4442
4447
|
visitAllExpressions(exprs: Expression[], context: any): void;
|
|
4443
4448
|
visitDeclareVarStmt(stmt: DeclareVarStmt, context: any): any;
|
|
4444
4449
|
visitDeclareFunctionStmt(stmt: DeclareFunctionStmt, context: any): any;
|
|
@@ -4759,6 +4764,17 @@ export declare enum StmtModifier {
|
|
|
4759
4764
|
|
|
4760
4765
|
export declare const STRING_TYPE: BuiltinType;
|
|
4761
4766
|
|
|
4767
|
+
export declare class StringToken extends Token {
|
|
4768
|
+
readonly kind: StringTokenKind;
|
|
4769
|
+
constructor(index: number, end: number, strValue: string, kind: StringTokenKind);
|
|
4770
|
+
}
|
|
4771
|
+
|
|
4772
|
+
export declare enum StringTokenKind {
|
|
4773
|
+
Plain = 0,
|
|
4774
|
+
TemplateLiteralPart = 1,
|
|
4775
|
+
TemplateLiteralEnd = 2
|
|
4776
|
+
}
|
|
4777
|
+
|
|
4762
4778
|
declare namespace t {
|
|
4763
4779
|
export {
|
|
4764
4780
|
tmplAstVisitAll as visitAll,
|
|
@@ -4821,16 +4837,16 @@ export declare interface TagDefinition {
|
|
|
4821
4837
|
getContentType(prefix?: string): TagContentType;
|
|
4822
4838
|
}
|
|
4823
4839
|
|
|
4824
|
-
declare function taggedTemplate(tag: Expression, template:
|
|
4840
|
+
declare function taggedTemplate(tag: Expression, template: TemplateLiteralExpr, type?: Type | null, sourceSpan?: ParseSourceSpan | null): TaggedTemplateLiteralExpr;
|
|
4825
4841
|
|
|
4826
|
-
export declare class
|
|
4842
|
+
export declare class TaggedTemplateLiteralExpr extends Expression {
|
|
4827
4843
|
tag: Expression;
|
|
4828
|
-
template:
|
|
4829
|
-
constructor(tag: Expression, template:
|
|
4844
|
+
template: TemplateLiteralExpr;
|
|
4845
|
+
constructor(tag: Expression, template: TemplateLiteralExpr, type?: Type | null, sourceSpan?: ParseSourceSpan | null);
|
|
4830
4846
|
isEquivalent(e: Expression): boolean;
|
|
4831
4847
|
isConstant(): boolean;
|
|
4832
4848
|
visitExpression(visitor: ExpressionVisitor, context: any): any;
|
|
4833
|
-
clone():
|
|
4849
|
+
clone(): TaggedTemplateLiteralExpr;
|
|
4834
4850
|
}
|
|
4835
4851
|
|
|
4836
4852
|
declare class TagPlaceholder implements Node_3 {
|
|
@@ -4904,19 +4920,37 @@ export declare class TemplateBindingParseResult {
|
|
|
4904
4920
|
/** Entity that is local to the template and defined within the template. */
|
|
4905
4921
|
export declare type TemplateEntity = TmplAstReference | TmplAstVariable | TmplAstLetDeclaration;
|
|
4906
4922
|
|
|
4907
|
-
export declare class TemplateLiteral {
|
|
4923
|
+
export declare class TemplateLiteral extends AST {
|
|
4908
4924
|
elements: TemplateLiteralElement[];
|
|
4909
|
-
expressions:
|
|
4910
|
-
constructor(elements: TemplateLiteralElement[], expressions:
|
|
4911
|
-
|
|
4925
|
+
expressions: AST[];
|
|
4926
|
+
constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, elements: TemplateLiteralElement[], expressions: AST[]);
|
|
4927
|
+
visit(visitor: AstVisitor, context?: any): any;
|
|
4912
4928
|
}
|
|
4913
4929
|
|
|
4914
|
-
export declare class TemplateLiteralElement {
|
|
4930
|
+
export declare class TemplateLiteralElement extends AST {
|
|
4931
|
+
text: string;
|
|
4932
|
+
constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, text: string);
|
|
4933
|
+
visit(visitor: AstVisitor, context?: any): any;
|
|
4934
|
+
}
|
|
4935
|
+
|
|
4936
|
+
export declare class TemplateLiteralElementExpr extends Expression {
|
|
4915
4937
|
text: string;
|
|
4916
|
-
sourceSpan?: ParseSourceSpan | undefined;
|
|
4917
4938
|
rawText: string;
|
|
4918
|
-
constructor(text: string, sourceSpan?: ParseSourceSpan |
|
|
4919
|
-
|
|
4939
|
+
constructor(text: string, sourceSpan?: ParseSourceSpan | null, rawText?: string);
|
|
4940
|
+
visitExpression(visitor: ExpressionVisitor, context: any): any;
|
|
4941
|
+
isEquivalent(e: Expression): boolean;
|
|
4942
|
+
isConstant(): boolean;
|
|
4943
|
+
clone(): TemplateLiteralElementExpr;
|
|
4944
|
+
}
|
|
4945
|
+
|
|
4946
|
+
export declare class TemplateLiteralExpr extends Expression {
|
|
4947
|
+
elements: TemplateLiteralElementExpr[];
|
|
4948
|
+
expressions: Expression[];
|
|
4949
|
+
constructor(elements: TemplateLiteralElementExpr[], expressions: Expression[], sourceSpan?: ParseSourceSpan | null);
|
|
4950
|
+
isEquivalent(e: Expression): boolean;
|
|
4951
|
+
isConstant(): boolean;
|
|
4952
|
+
visitExpression(visitor: ExpressionVisitor, context: any): any;
|
|
4953
|
+
clone(): TemplateLiteralExpr;
|
|
4920
4954
|
}
|
|
4921
4955
|
|
|
4922
4956
|
declare class Text_2 extends NodeWithI18n {
|
|
@@ -5348,7 +5382,7 @@ export declare class Token {
|
|
|
5348
5382
|
constructor(index: number, end: number, type: TokenType, numValue: number, strValue: string);
|
|
5349
5383
|
isCharacter(code: number): boolean;
|
|
5350
5384
|
isNumber(): boolean;
|
|
5351
|
-
isString():
|
|
5385
|
+
isString(): this is StringToken;
|
|
5352
5386
|
isOperator(operator: string): boolean;
|
|
5353
5387
|
isIdentifier(): boolean;
|
|
5354
5388
|
isPrivateIdentifier(): boolean;
|
|
@@ -5363,6 +5397,10 @@ export declare class Token {
|
|
|
5363
5397
|
isKeywordTypeof(): boolean;
|
|
5364
5398
|
isError(): boolean;
|
|
5365
5399
|
toNumber(): number;
|
|
5400
|
+
isTemplateLiteralPart(): this is StringToken;
|
|
5401
|
+
isTemplateLiteralEnd(): this is StringToken;
|
|
5402
|
+
isTemplateLiteralInterpolationStart(): boolean;
|
|
5403
|
+
isTemplateLiteralInterpolationEnd(): boolean;
|
|
5366
5404
|
toString(): string | null;
|
|
5367
5405
|
}
|
|
5368
5406
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/compiler",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.2.0-next.0",
|
|
4
4
|
"description": "Angular - the compiler library",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"tslib": "^2.3.0"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@angular/core": "19.
|
|
14
|
+
"@angular/core": "19.2.0-next.0"
|
|
15
15
|
},
|
|
16
16
|
"peerDependenciesMeta": {
|
|
17
17
|
"@angular/core": {
|