@angular/compiler 19.0.0-next.8 → 19.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/compiler.mjs +1819 -802
- package/fesm2022/compiler.mjs.map +1 -1
- package/index.d.ts +57 -8
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.0.0-
|
|
2
|
+
* @license Angular v19.0.0-rc.0
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -75,6 +75,7 @@ export declare class AstMemoryEfficientTransformer implements AstVisitor {
|
|
|
75
75
|
visitUnary(ast: Unary, context: any): AST;
|
|
76
76
|
visitBinary(ast: Binary, context: any): AST;
|
|
77
77
|
visitPrefixNot(ast: PrefixNot, context: any): AST;
|
|
78
|
+
visitTypeofExpresion(ast: TypeofExpression, context: any): AST;
|
|
78
79
|
visitNonNullAssert(ast: NonNullAssert, context: any): AST;
|
|
79
80
|
visitConditional(ast: Conditional, context: any): AST;
|
|
80
81
|
visitPipe(ast: BindingPipe, context: any): AST;
|
|
@@ -100,6 +101,7 @@ export declare class AstTransformer implements AstVisitor {
|
|
|
100
101
|
visitUnary(ast: Unary, context: any): AST;
|
|
101
102
|
visitBinary(ast: Binary, context: any): AST;
|
|
102
103
|
visitPrefixNot(ast: PrefixNot, context: any): AST;
|
|
104
|
+
visitTypeofExpresion(ast: TypeofExpression, context: any): AST;
|
|
103
105
|
visitNonNullAssert(ast: NonNullAssert, context: any): AST;
|
|
104
106
|
visitConditional(ast: Conditional, context: any): AST;
|
|
105
107
|
visitPipe(ast: BindingPipe, context: any): AST;
|
|
@@ -135,6 +137,7 @@ export declare interface AstVisitor {
|
|
|
135
137
|
visitLiteralPrimitive(ast: LiteralPrimitive, context: any): any;
|
|
136
138
|
visitPipe(ast: BindingPipe, context: any): any;
|
|
137
139
|
visitPrefixNot(ast: PrefixNot, context: any): any;
|
|
140
|
+
visitTypeofExpresion(ast: TypeofExpression, context: any): any;
|
|
138
141
|
visitNonNullAssert(ast: NonNullAssert, context: any): any;
|
|
139
142
|
visitPropertyRead(ast: PropertyRead, context: any): any;
|
|
140
143
|
visitPropertyWrite(ast: PropertyWrite, context: any): any;
|
|
@@ -739,6 +742,25 @@ export declare function compileDirectiveFromMetadata(meta: R3DirectiveMetadata,
|
|
|
739
742
|
*/
|
|
740
743
|
export declare function compileFactoryFunction(meta: R3FactoryMetadata): R3CompiledExpression;
|
|
741
744
|
|
|
745
|
+
/**
|
|
746
|
+
* Compiles the expression that initializes HMR for a class.
|
|
747
|
+
* @param meta HMR metadata extracted from the class.
|
|
748
|
+
*/
|
|
749
|
+
export declare function compileHmrInitializer(meta: R3HmrMetadata): outputAst.Expression;
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* Compiles the HMR update callback for a class.
|
|
753
|
+
* @param definitions Compiled definitions for the class (e.g. `defineComponent` calls).
|
|
754
|
+
* @param constantStatements Supporting constants statements that were generated alongside
|
|
755
|
+
* the definition.
|
|
756
|
+
* @param meta HMR metadata extracted from the class.
|
|
757
|
+
*/
|
|
758
|
+
export declare function compileHmrUpdateCallback(definitions: {
|
|
759
|
+
name: string;
|
|
760
|
+
initializer: outputAst.Expression | null;
|
|
761
|
+
statements: outputAst.Statement[];
|
|
762
|
+
}[], constantStatements: outputAst.Statement[], meta: R3HmrMetadata): outputAst.DeclareFunctionStmt;
|
|
763
|
+
|
|
742
764
|
export declare interface CompileIdentifierMetadata {
|
|
743
765
|
reference: any;
|
|
744
766
|
}
|
|
@@ -1157,8 +1179,9 @@ export declare class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
|
|
1157
1179
|
export declare const DYNAMIC_TYPE: BuiltinType;
|
|
1158
1180
|
|
|
1159
1181
|
export declare class DynamicImportExpr extends Expression {
|
|
1160
|
-
url: string;
|
|
1161
|
-
|
|
1182
|
+
url: string | Expression;
|
|
1183
|
+
urlComment?: string | undefined;
|
|
1184
|
+
constructor(url: string | Expression, sourceSpan?: ParseSourceSpan | null, urlComment?: string | undefined);
|
|
1162
1185
|
isEquivalent(e: Expression): boolean;
|
|
1163
1186
|
isConstant(): boolean;
|
|
1164
1187
|
visitExpression(visitor: ExpressionVisitor, context: any): any;
|
|
@@ -1729,8 +1752,6 @@ export declare class InvokeFunctionExpr extends Expression {
|
|
|
1729
1752
|
clone(): InvokeFunctionExpr;
|
|
1730
1753
|
}
|
|
1731
1754
|
|
|
1732
|
-
export declare function isIdentifier(input: string): boolean;
|
|
1733
|
-
|
|
1734
1755
|
export declare function isNgContainer(tagName: string): boolean;
|
|
1735
1756
|
|
|
1736
1757
|
export declare function isNgContent(tagName: string): boolean;
|
|
@@ -2898,6 +2919,10 @@ export declare interface R3ComponentMetadata<DeclarationT extends R3TemplateDepe
|
|
|
2898
2919
|
* A collection of styling data that will be applied and scoped to the component.
|
|
2899
2920
|
*/
|
|
2900
2921
|
styles: string[];
|
|
2922
|
+
/**
|
|
2923
|
+
* A collection of style paths for external stylesheets that will be applied and scoped to the component.
|
|
2924
|
+
*/
|
|
2925
|
+
externalStyles?: string[];
|
|
2901
2926
|
/**
|
|
2902
2927
|
* An encapsulation policy for the component's styling.
|
|
2903
2928
|
* Possible values:
|
|
@@ -3693,6 +3718,24 @@ declare enum R3FactoryDelegateType {
|
|
|
3693
3718
|
|
|
3694
3719
|
export declare type R3FactoryMetadata = R3ConstructorFactoryMetadata | R3DelegatedFnOrClassMetadata | R3ExpressionFactoryMetadata;
|
|
3695
3720
|
|
|
3721
|
+
/** Metadata necessary to compile HMR-related code call. */
|
|
3722
|
+
export declare interface R3HmrMetadata {
|
|
3723
|
+
/** Component class for which HMR is being enabled. */
|
|
3724
|
+
type: outputAst.Expression;
|
|
3725
|
+
/** Name of the component class. */
|
|
3726
|
+
className: string;
|
|
3727
|
+
/** File path of the component class. */
|
|
3728
|
+
filePath: string;
|
|
3729
|
+
/** Name under which `@angular/core` should be referred to in the compiled HMR code. */
|
|
3730
|
+
coreName: string;
|
|
3731
|
+
/**
|
|
3732
|
+
* HMR update functions cannot contain imports so any locals the generated code depends on
|
|
3733
|
+
* (e.g. references to imports within the same file or imported symbols) have to be passed in
|
|
3734
|
+
* as function parameters. This array contains the names of those local symbols.
|
|
3735
|
+
*/
|
|
3736
|
+
locals: string[];
|
|
3737
|
+
}
|
|
3738
|
+
|
|
3696
3739
|
/**
|
|
3697
3740
|
* Information needed to compile a host directive for the render3 runtime.
|
|
3698
3741
|
*/
|
|
@@ -3946,10 +3989,10 @@ export declare class R3Identifiers {
|
|
|
3946
3989
|
static NgOnChangesFeature: outputAst.ExternalReference;
|
|
3947
3990
|
static InheritDefinitionFeature: outputAst.ExternalReference;
|
|
3948
3991
|
static CopyDefinitionFeature: outputAst.ExternalReference;
|
|
3949
|
-
static StandaloneFeature: outputAst.ExternalReference;
|
|
3950
3992
|
static ProvidersFeature: outputAst.ExternalReference;
|
|
3951
3993
|
static HostDirectivesFeature: outputAst.ExternalReference;
|
|
3952
3994
|
static InputTransformsFeatureFeature: outputAst.ExternalReference;
|
|
3995
|
+
static ExternalStylesFeature: outputAst.ExternalReference;
|
|
3953
3996
|
static listener: outputAst.ExternalReference;
|
|
3954
3997
|
static getInheritedFactory: outputAst.ExternalReference;
|
|
3955
3998
|
static sanitizeHtml: outputAst.ExternalReference;
|
|
@@ -4369,6 +4412,7 @@ export declare class RecursiveAstVisitor implements AstVisitor {
|
|
|
4369
4412
|
visitLiteralMap(ast: LiteralMap, context: any): any;
|
|
4370
4413
|
visitLiteralPrimitive(ast: LiteralPrimitive, context: any): any;
|
|
4371
4414
|
visitPrefixNot(ast: PrefixNot, context: any): any;
|
|
4415
|
+
visitTypeofExpresion(ast: TypeofExpression, context: any): void;
|
|
4372
4416
|
visitNonNullAssert(ast: NonNullAssert, context: any): any;
|
|
4373
4417
|
visitPropertyRead(ast: PropertyRead, context: any): any;
|
|
4374
4418
|
visitPropertyWrite(ast: PropertyWrite, context: any): any;
|
|
@@ -5332,6 +5376,7 @@ export declare class Token {
|
|
|
5332
5376
|
isKeywordTrue(): boolean;
|
|
5333
5377
|
isKeywordFalse(): boolean;
|
|
5334
5378
|
isKeywordThis(): boolean;
|
|
5379
|
+
isKeywordTypeof(): boolean;
|
|
5335
5380
|
isError(): boolean;
|
|
5336
5381
|
toNumber(): number;
|
|
5337
5382
|
toString(): string | null;
|
|
@@ -5468,6 +5513,12 @@ export declare class TypeofExpr extends Expression {
|
|
|
5468
5513
|
|
|
5469
5514
|
declare function typeofExpr(expr: Expression): TypeofExpr;
|
|
5470
5515
|
|
|
5516
|
+
export declare class TypeofExpression extends AST {
|
|
5517
|
+
expression: AST;
|
|
5518
|
+
constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expression: AST);
|
|
5519
|
+
visit(visitor: AstVisitor, context?: any): any;
|
|
5520
|
+
}
|
|
5521
|
+
|
|
5471
5522
|
export declare interface TypeVisitor {
|
|
5472
5523
|
visitBuiltinType(type: BuiltinType, context: any): any;
|
|
5473
5524
|
visitExpressionType(type: ExpressionType, context: any): any;
|
|
@@ -5652,8 +5703,6 @@ export declare class Xliff2 extends Serializer {
|
|
|
5652
5703
|
}
|
|
5653
5704
|
|
|
5654
5705
|
export declare class Xmb extends Serializer {
|
|
5655
|
-
private readonly preservePlaceholders;
|
|
5656
|
-
constructor(preservePlaceholders?: boolean);
|
|
5657
5706
|
write(messages: i18n.Message[], locale: string | null): string;
|
|
5658
5707
|
load(content: string, url: string): {
|
|
5659
5708
|
locale: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/compiler",
|
|
3
|
-
"version": "19.0.0-
|
|
3
|
+
"version": "19.0.0-rc.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.0.0-
|
|
14
|
+
"@angular/core": "19.0.0-rc.0"
|
|
15
15
|
},
|
|
16
16
|
"peerDependenciesMeta": {
|
|
17
17
|
"@angular/core": {
|