@angular/compiler 19.0.0-next.9 → 19.0.0-rc.1

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.1
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;
@@ -1382,8 +1405,7 @@ export declare class ExternalExpr extends Expression {
1382
1405
  export declare class ExternalReference {
1383
1406
  moduleName: string | null;
1384
1407
  name: string | null;
1385
- runtime?: any | null;
1386
- constructor(moduleName: string | null, name: string | null, runtime?: any | null);
1408
+ constructor(moduleName: string | null, name: string | null);
1387
1409
  }
1388
1410
 
1389
1411
  declare interface ExternalReferenceResolver {
@@ -1729,8 +1751,6 @@ export declare class InvokeFunctionExpr extends Expression {
1729
1751
  clone(): InvokeFunctionExpr;
1730
1752
  }
1731
1753
 
1732
- export declare function isIdentifier(input: string): boolean;
1733
-
1734
1754
  export declare function isNgContainer(tagName: string): boolean;
1735
1755
 
1736
1756
  export declare function isNgContent(tagName: string): boolean;
@@ -3697,6 +3717,24 @@ declare enum R3FactoryDelegateType {
3697
3717
 
3698
3718
  export declare type R3FactoryMetadata = R3ConstructorFactoryMetadata | R3DelegatedFnOrClassMetadata | R3ExpressionFactoryMetadata;
3699
3719
 
3720
+ /** Metadata necessary to compile HMR-related code call. */
3721
+ export declare interface R3HmrMetadata {
3722
+ /** Component class for which HMR is being enabled. */
3723
+ type: outputAst.Expression;
3724
+ /** Name of the component class. */
3725
+ className: string;
3726
+ /** File path of the component class. */
3727
+ filePath: string;
3728
+ /** Name under which `@angular/core` should be referred to in the compiled HMR code. */
3729
+ coreName: string;
3730
+ /**
3731
+ * HMR update functions cannot contain imports so any locals the generated code depends on
3732
+ * (e.g. references to imports within the same file or imported symbols) have to be passed in
3733
+ * as function parameters. This array contains the names of those local symbols.
3734
+ */
3735
+ locals: string[];
3736
+ }
3737
+
3700
3738
  /**
3701
3739
  * Information needed to compile a host directive for the render3 runtime.
3702
3740
  */
@@ -3950,7 +3988,6 @@ export declare class R3Identifiers {
3950
3988
  static NgOnChangesFeature: outputAst.ExternalReference;
3951
3989
  static InheritDefinitionFeature: outputAst.ExternalReference;
3952
3990
  static CopyDefinitionFeature: outputAst.ExternalReference;
3953
- static StandaloneFeature: outputAst.ExternalReference;
3954
3991
  static ProvidersFeature: outputAst.ExternalReference;
3955
3992
  static HostDirectivesFeature: outputAst.ExternalReference;
3956
3993
  static InputTransformsFeatureFeature: outputAst.ExternalReference;
@@ -4374,6 +4411,7 @@ export declare class RecursiveAstVisitor implements AstVisitor {
4374
4411
  visitLiteralMap(ast: LiteralMap, context: any): any;
4375
4412
  visitLiteralPrimitive(ast: LiteralPrimitive, context: any): any;
4376
4413
  visitPrefixNot(ast: PrefixNot, context: any): any;
4414
+ visitTypeofExpresion(ast: TypeofExpression, context: any): void;
4377
4415
  visitNonNullAssert(ast: NonNullAssert, context: any): any;
4378
4416
  visitPropertyRead(ast: PropertyRead, context: any): any;
4379
4417
  visitPropertyWrite(ast: PropertyWrite, context: any): any;
@@ -5337,6 +5375,7 @@ export declare class Token {
5337
5375
  isKeywordTrue(): boolean;
5338
5376
  isKeywordFalse(): boolean;
5339
5377
  isKeywordThis(): boolean;
5378
+ isKeywordTypeof(): boolean;
5340
5379
  isError(): boolean;
5341
5380
  toNumber(): number;
5342
5381
  toString(): string | null;
@@ -5473,6 +5512,12 @@ export declare class TypeofExpr extends Expression {
5473
5512
 
5474
5513
  declare function typeofExpr(expr: Expression): TypeofExpr;
5475
5514
 
5515
+ export declare class TypeofExpression extends AST {
5516
+ expression: AST;
5517
+ constructor(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expression: AST);
5518
+ visit(visitor: AstVisitor, context?: any): any;
5519
+ }
5520
+
5476
5521
  export declare interface TypeVisitor {
5477
5522
  visitBuiltinType(type: BuiltinType, context: any): any;
5478
5523
  visitExpressionType(type: ExpressionType, context: any): any;
@@ -5657,8 +5702,6 @@ export declare class Xliff2 extends Serializer {
5657
5702
  }
5658
5703
 
5659
5704
  export declare class Xmb extends Serializer {
5660
- private readonly preservePlaceholders;
5661
- constructor(preservePlaceholders?: boolean);
5662
5705
  write(messages: i18n.Message[], locale: string | null): string;
5663
5706
  load(content: string, url: string): {
5664
5707
  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.1",
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.1"
15
15
  },
16
16
  "peerDependenciesMeta": {
17
17
  "@angular/core": {