@angular/compiler 19.0.0-next.9 → 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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.0.0-next.9
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
- constructor(url: string, sourceSpan?: ParseSourceSpan | null);
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;
@@ -3697,6 +3718,24 @@ declare enum R3FactoryDelegateType {
3697
3718
 
3698
3719
  export declare type R3FactoryMetadata = R3ConstructorFactoryMetadata | R3DelegatedFnOrClassMetadata | R3ExpressionFactoryMetadata;
3699
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
+
3700
3739
  /**
3701
3740
  * Information needed to compile a host directive for the render3 runtime.
3702
3741
  */
@@ -3950,7 +3989,6 @@ export declare class R3Identifiers {
3950
3989
  static NgOnChangesFeature: outputAst.ExternalReference;
3951
3990
  static InheritDefinitionFeature: outputAst.ExternalReference;
3952
3991
  static CopyDefinitionFeature: outputAst.ExternalReference;
3953
- static StandaloneFeature: outputAst.ExternalReference;
3954
3992
  static ProvidersFeature: outputAst.ExternalReference;
3955
3993
  static HostDirectivesFeature: outputAst.ExternalReference;
3956
3994
  static InputTransformsFeatureFeature: outputAst.ExternalReference;
@@ -4374,6 +4412,7 @@ export declare class RecursiveAstVisitor implements AstVisitor {
4374
4412
  visitLiteralMap(ast: LiteralMap, context: any): any;
4375
4413
  visitLiteralPrimitive(ast: LiteralPrimitive, context: any): any;
4376
4414
  visitPrefixNot(ast: PrefixNot, context: any): any;
4415
+ visitTypeofExpresion(ast: TypeofExpression, context: any): void;
4377
4416
  visitNonNullAssert(ast: NonNullAssert, context: any): any;
4378
4417
  visitPropertyRead(ast: PropertyRead, context: any): any;
4379
4418
  visitPropertyWrite(ast: PropertyWrite, context: any): any;
@@ -5337,6 +5376,7 @@ export declare class Token {
5337
5376
  isKeywordTrue(): boolean;
5338
5377
  isKeywordFalse(): boolean;
5339
5378
  isKeywordThis(): boolean;
5379
+ isKeywordTypeof(): boolean;
5340
5380
  isError(): boolean;
5341
5381
  toNumber(): number;
5342
5382
  toString(): string | null;
@@ -5473,6 +5513,12 @@ export declare class TypeofExpr extends Expression {
5473
5513
 
5474
5514
  declare function typeofExpr(expr: Expression): TypeofExpr;
5475
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
+
5476
5522
  export declare interface TypeVisitor {
5477
5523
  visitBuiltinType(type: BuiltinType, context: any): any;
5478
5524
  visitExpressionType(type: ExpressionType, context: any): any;
@@ -5657,8 +5703,6 @@ export declare class Xliff2 extends Serializer {
5657
5703
  }
5658
5704
 
5659
5705
  export declare class Xmb extends Serializer {
5660
- private readonly preservePlaceholders;
5661
- constructor(preservePlaceholders?: boolean);
5662
5706
  write(messages: i18n.Message[], locale: string | null): string;
5663
5707
  load(content: string, url: string): {
5664
5708
  locale: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler",
3
- "version": "19.0.0-next.9",
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-next.9"
14
+ "@angular/core": "19.0.0-rc.0"
15
15
  },
16
16
  "peerDependenciesMeta": {
17
17
  "@angular/core": {