@angular/compiler 22.0.0-next.2 → 22.0.0-next.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler",
3
- "version": "22.0.0-next.2",
3
+ "version": "22.0.0-next.4",
4
4
  "description": "Angular - the compiler library",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v22.0.0-next.2
2
+ * @license Angular v22.0.0-next.4
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -927,9 +927,10 @@ declare function areAllEquivalent<T extends {
927
927
  isEquivalent(other: T): boolean;
928
928
  }>(base: T[], other: T[]): boolean;
929
929
  declare abstract class Expression {
930
+ leadingComments?: LeadingComment[] | undefined;
930
931
  type: Type$1 | null;
931
932
  sourceSpan: ParseSourceSpan$1 | null;
932
- constructor(type: Type$1 | null | undefined, sourceSpan?: ParseSourceSpan$1 | null);
933
+ constructor(type: Type$1 | null | undefined, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[] | undefined);
933
934
  abstract visitExpression(visitor: ExpressionVisitor, context: any): any;
934
935
  /**
935
936
  * Calculates whether this expression produces the same value as the given expression.
@@ -943,9 +944,9 @@ declare abstract class Expression {
943
944
  abstract clone(): Expression;
944
945
  prop(name: string, sourceSpan?: ParseSourceSpan$1 | null): ReadPropExpr;
945
946
  key(index: Expression, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null): ReadKeyExpr;
946
- callFn(params: Expression[], sourceSpan?: ParseSourceSpan$1 | null, pure?: boolean): InvokeFunctionExpr;
947
- instantiate(params: Expression[], type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null): InstantiateExpr;
948
- conditional(trueCase: Expression, falseCase?: Expression | null, sourceSpan?: ParseSourceSpan$1 | null): ConditionalExpr;
947
+ callFn(params: Expression[], sourceSpan?: ParseSourceSpan$1 | null, pure?: boolean, leadingComments?: LeadingComment[]): InvokeFunctionExpr;
948
+ instantiate(params: Expression[], type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]): InstantiateExpr;
949
+ conditional(trueCase: Expression, falseCase?: Expression | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]): ConditionalExpr;
949
950
  equals(rhs: Expression, sourceSpan?: ParseSourceSpan$1 | null): BinaryOperatorExpr;
950
951
  notEquals(rhs: Expression, sourceSpan?: ParseSourceSpan$1 | null): BinaryOperatorExpr;
951
952
  identical(rhs: Expression, sourceSpan?: ParseSourceSpan$1 | null): BinaryOperatorExpr;
@@ -966,11 +967,11 @@ declare abstract class Expression {
966
967
  biggerEquals(rhs: Expression, sourceSpan?: ParseSourceSpan$1 | null): BinaryOperatorExpr;
967
968
  isBlank(sourceSpan?: ParseSourceSpan$1 | null): Expression;
968
969
  nullishCoalesce(rhs: Expression, sourceSpan?: ParseSourceSpan$1 | null): BinaryOperatorExpr;
969
- toStmt(): Statement;
970
+ toStmt(leadingComments?: LeadingComment[]): Statement;
970
971
  }
971
972
  declare class ReadVarExpr extends Expression {
972
973
  name: string;
973
- constructor(name: string, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null);
974
+ constructor(name: string, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
974
975
  isEquivalent(e: Expression): boolean;
975
976
  isConstant(): boolean;
976
977
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -979,7 +980,7 @@ declare class ReadVarExpr extends Expression {
979
980
  }
980
981
  declare class TypeofExpr extends Expression {
981
982
  expr: Expression;
982
- constructor(expr: Expression, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null);
983
+ constructor(expr: Expression, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
983
984
  visitExpression(visitor: ExpressionVisitor, context: any): any;
984
985
  isEquivalent(e: Expression): boolean;
985
986
  isConstant(): boolean;
@@ -987,7 +988,7 @@ declare class TypeofExpr extends Expression {
987
988
  }
988
989
  declare class VoidExpr extends Expression {
989
990
  expr: Expression;
990
- constructor(expr: Expression, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null);
991
+ constructor(expr: Expression, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
991
992
  visitExpression(visitor: ExpressionVisitor, context: any): any;
992
993
  isEquivalent(e: Expression): boolean;
993
994
  isConstant(): boolean;
@@ -995,7 +996,7 @@ declare class VoidExpr extends Expression {
995
996
  }
996
997
  declare class WrappedNodeExpr<T> extends Expression {
997
998
  node: T;
998
- constructor(node: T, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null);
999
+ constructor(node: T, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
999
1000
  isEquivalent(e: Expression): boolean;
1000
1001
  isConstant(): boolean;
1001
1002
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1005,7 +1006,7 @@ declare class InvokeFunctionExpr extends Expression {
1005
1006
  fn: Expression;
1006
1007
  args: Expression[];
1007
1008
  pure: boolean;
1008
- constructor(fn: Expression, args: Expression[], type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, pure?: boolean);
1009
+ constructor(fn: Expression, args: Expression[], type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, pure?: boolean, leadingComments?: LeadingComment[]);
1009
1010
  get receiver(): Expression;
1010
1011
  isEquivalent(e: Expression): boolean;
1011
1012
  isConstant(): boolean;
@@ -1015,7 +1016,7 @@ declare class InvokeFunctionExpr extends Expression {
1015
1016
  declare class TaggedTemplateLiteralExpr extends Expression {
1016
1017
  tag: Expression;
1017
1018
  template: TemplateLiteralExpr;
1018
- constructor(tag: Expression, template: TemplateLiteralExpr, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null);
1019
+ constructor(tag: Expression, template: TemplateLiteralExpr, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1019
1020
  isEquivalent(e: Expression): boolean;
1020
1021
  isConstant(): boolean;
1021
1022
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1024,7 +1025,7 @@ declare class TaggedTemplateLiteralExpr extends Expression {
1024
1025
  declare class InstantiateExpr extends Expression {
1025
1026
  classExpr: Expression;
1026
1027
  args: Expression[];
1027
- constructor(classExpr: Expression, args: Expression[], type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null);
1028
+ constructor(classExpr: Expression, args: Expression[], type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1028
1029
  isEquivalent(e: Expression): boolean;
1029
1030
  isConstant(): boolean;
1030
1031
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1033,7 +1034,7 @@ declare class InstantiateExpr extends Expression {
1033
1034
  declare class RegularExpressionLiteralExpr extends Expression {
1034
1035
  body: string;
1035
1036
  flags: string | null;
1036
- constructor(body: string, flags: string | null, sourceSpan?: ParseSourceSpan$1 | null);
1037
+ constructor(body: string, flags: string | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1037
1038
  isEquivalent(e: Expression): boolean;
1038
1039
  isConstant(): boolean;
1039
1040
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1041,7 +1042,7 @@ declare class RegularExpressionLiteralExpr extends Expression {
1041
1042
  }
1042
1043
  declare class LiteralExpr extends Expression {
1043
1044
  value: number | string | boolean | null | undefined;
1044
- constructor(value: number | string | boolean | null | undefined, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null);
1045
+ constructor(value: number | string | boolean | null | undefined, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1045
1046
  isEquivalent(e: Expression): boolean;
1046
1047
  isConstant(): boolean;
1047
1048
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1050,7 +1051,7 @@ declare class LiteralExpr extends Expression {
1050
1051
  declare class TemplateLiteralExpr extends Expression {
1051
1052
  elements: TemplateLiteralElementExpr[];
1052
1053
  expressions: Expression[];
1053
- constructor(elements: TemplateLiteralElementExpr[], expressions: Expression[], sourceSpan?: ParseSourceSpan$1 | null);
1054
+ constructor(elements: TemplateLiteralElementExpr[], expressions: Expression[], sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1054
1055
  isEquivalent(e: Expression): boolean;
1055
1056
  isConstant(): boolean;
1056
1057
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1059,7 +1060,7 @@ declare class TemplateLiteralExpr extends Expression {
1059
1060
  declare class TemplateLiteralElementExpr extends Expression {
1060
1061
  readonly text: string;
1061
1062
  readonly rawText: string;
1062
- constructor(text: string, sourceSpan?: ParseSourceSpan$1 | null, rawText?: string);
1063
+ constructor(text: string, sourceSpan?: ParseSourceSpan$1 | null, rawText?: string, leadingComments?: LeadingComment[]);
1063
1064
  visitExpression(visitor: ExpressionVisitor, context: any): any;
1064
1065
  isEquivalent(e: Expression): boolean;
1065
1066
  isConstant(): boolean;
@@ -1091,7 +1092,7 @@ declare class LocalizedString extends Expression {
1091
1092
  readonly messageParts: LiteralPiece[];
1092
1093
  readonly placeHolderNames: PlaceholderPiece[];
1093
1094
  readonly expressions: Expression[];
1094
- constructor(metaBlock: I18nMeta, messageParts: LiteralPiece[], placeHolderNames: PlaceholderPiece[], expressions: Expression[], sourceSpan?: ParseSourceSpan$1 | null);
1095
+ constructor(metaBlock: I18nMeta, messageParts: LiteralPiece[], placeHolderNames: PlaceholderPiece[], expressions: Expression[], sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1095
1096
  isEquivalent(e: Expression): boolean;
1096
1097
  isConstant(): boolean;
1097
1098
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1132,7 +1133,7 @@ interface CookedRawString {
1132
1133
  declare class ExternalExpr extends Expression {
1133
1134
  value: ExternalReference;
1134
1135
  typeParams: Type$1[] | null;
1135
- constructor(value: ExternalReference, type?: Type$1 | null, typeParams?: Type$1[] | null, sourceSpan?: ParseSourceSpan$1 | null);
1136
+ constructor(value: ExternalReference, type?: Type$1 | null, typeParams?: Type$1[] | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1136
1137
  isEquivalent(e: Expression): boolean;
1137
1138
  isConstant(): boolean;
1138
1139
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1147,7 +1148,7 @@ declare class ConditionalExpr extends Expression {
1147
1148
  condition: Expression;
1148
1149
  falseCase: Expression | null;
1149
1150
  trueCase: Expression;
1150
- constructor(condition: Expression, trueCase: Expression, falseCase?: Expression | null, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null);
1151
+ constructor(condition: Expression, trueCase: Expression, falseCase?: Expression | null, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1151
1152
  isEquivalent(e: Expression): boolean;
1152
1153
  isConstant(): boolean;
1153
1154
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1156,7 +1157,7 @@ declare class ConditionalExpr extends Expression {
1156
1157
  declare class DynamicImportExpr extends Expression {
1157
1158
  url: string | Expression;
1158
1159
  urlComment?: string | undefined;
1159
- constructor(url: string | Expression, sourceSpan?: ParseSourceSpan$1 | null, urlComment?: string | undefined);
1160
+ constructor(url: string | Expression, sourceSpan?: ParseSourceSpan$1 | null, urlComment?: string | undefined, leadingComments?: LeadingComment[]);
1160
1161
  isEquivalent(e: Expression): boolean;
1161
1162
  isConstant(): boolean;
1162
1163
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1164,7 +1165,7 @@ declare class DynamicImportExpr extends Expression {
1164
1165
  }
1165
1166
  declare class NotExpr extends Expression {
1166
1167
  condition: Expression;
1167
- constructor(condition: Expression, sourceSpan?: ParseSourceSpan$1 | null);
1168
+ constructor(condition: Expression, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1168
1169
  isEquivalent(e: Expression): boolean;
1169
1170
  isConstant(): boolean;
1170
1171
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1181,7 +1182,7 @@ declare class FunctionExpr extends Expression {
1181
1182
  params: FnParam[];
1182
1183
  statements: Statement[];
1183
1184
  name?: string | null | undefined;
1184
- constructor(params: FnParam[], statements: Statement[], type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, name?: string | null | undefined);
1185
+ constructor(params: FnParam[], statements: Statement[], type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, name?: string | null | undefined, leadingComments?: LeadingComment[]);
1185
1186
  isEquivalent(e: Expression | Statement): boolean;
1186
1187
  isConstant(): boolean;
1187
1188
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1191,7 +1192,7 @@ declare class FunctionExpr extends Expression {
1191
1192
  declare class ArrowFunctionExpr extends Expression {
1192
1193
  params: FnParam[];
1193
1194
  body: Expression | Statement[];
1194
- constructor(params: FnParam[], body: Expression | Statement[], type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null);
1195
+ constructor(params: FnParam[], body: Expression | Statement[], type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1195
1196
  isEquivalent(e: Expression): boolean;
1196
1197
  isConstant(): boolean;
1197
1198
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1202,7 +1203,7 @@ declare class UnaryOperatorExpr extends Expression {
1202
1203
  operator: UnaryOperator;
1203
1204
  expr: Expression;
1204
1205
  parens: boolean;
1205
- constructor(operator: UnaryOperator, expr: Expression, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, parens?: boolean);
1206
+ constructor(operator: UnaryOperator, expr: Expression, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, parens?: boolean, leadingComments?: LeadingComment[]);
1206
1207
  isEquivalent(e: Expression): boolean;
1207
1208
  isConstant(): boolean;
1208
1209
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1210,7 +1211,7 @@ declare class UnaryOperatorExpr extends Expression {
1210
1211
  }
1211
1212
  declare class ParenthesizedExpr extends Expression {
1212
1213
  expr: Expression;
1213
- constructor(expr: Expression, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null);
1214
+ constructor(expr: Expression, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1214
1215
  visitExpression(visitor: ExpressionVisitor, context: any): any;
1215
1216
  isEquivalent(e: Expression): boolean;
1216
1217
  isConstant(): boolean;
@@ -1220,7 +1221,7 @@ declare class BinaryOperatorExpr extends Expression {
1220
1221
  operator: BinaryOperator;
1221
1222
  rhs: Expression;
1222
1223
  lhs: Expression;
1223
- constructor(operator: BinaryOperator, lhs: Expression, rhs: Expression, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null);
1224
+ constructor(operator: BinaryOperator, lhs: Expression, rhs: Expression, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1224
1225
  isEquivalent(e: Expression): boolean;
1225
1226
  isConstant(): boolean;
1226
1227
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1230,7 +1231,7 @@ declare class BinaryOperatorExpr extends Expression {
1230
1231
  declare class ReadPropExpr extends Expression {
1231
1232
  receiver: Expression;
1232
1233
  name: string;
1233
- constructor(receiver: Expression, name: string, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null);
1234
+ constructor(receiver: Expression, name: string, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1234
1235
  get index(): string;
1235
1236
  isEquivalent(e: Expression): boolean;
1236
1237
  isConstant(): boolean;
@@ -1241,7 +1242,7 @@ declare class ReadPropExpr extends Expression {
1241
1242
  declare class ReadKeyExpr extends Expression {
1242
1243
  receiver: Expression;
1243
1244
  index: Expression;
1244
- constructor(receiver: Expression, index: Expression, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null);
1245
+ constructor(receiver: Expression, index: Expression, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1245
1246
  isEquivalent(e: Expression): boolean;
1246
1247
  isConstant(): boolean;
1247
1248
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1250,7 +1251,7 @@ declare class ReadKeyExpr extends Expression {
1250
1251
  }
1251
1252
  declare class LiteralArrayExpr extends Expression {
1252
1253
  entries: Expression[];
1253
- constructor(entries: Expression[], type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null);
1254
+ constructor(entries: Expression[], type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1254
1255
  isConstant(): boolean;
1255
1256
  isEquivalent(e: Expression): boolean;
1256
1257
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1276,7 +1277,7 @@ type LiteralMapEntry = LiteralMapPropertyAssignment | LiteralMapSpreadAssignment
1276
1277
  declare class LiteralMapExpr extends Expression {
1277
1278
  entries: LiteralMapEntry[];
1278
1279
  valueType: Type$1 | null;
1279
- constructor(entries: LiteralMapEntry[], type?: MapType | null, sourceSpan?: ParseSourceSpan$1 | null);
1280
+ constructor(entries: LiteralMapEntry[], type?: MapType | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1280
1281
  isEquivalent(e: Expression): boolean;
1281
1282
  isConstant(): boolean;
1282
1283
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1284,7 +1285,7 @@ declare class LiteralMapExpr extends Expression {
1284
1285
  }
1285
1286
  declare class CommaExpr extends Expression {
1286
1287
  parts: Expression[];
1287
- constructor(parts: Expression[], sourceSpan?: ParseSourceSpan$1 | null);
1288
+ constructor(parts: Expression[], sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1288
1289
  isEquivalent(e: Expression): boolean;
1289
1290
  isConstant(): boolean;
1290
1291
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1292,7 +1293,7 @@ declare class CommaExpr extends Expression {
1292
1293
  }
1293
1294
  declare class SpreadElementExpr extends Expression {
1294
1295
  expression: Expression;
1295
- constructor(expression: Expression, sourceSpan?: ParseSourceSpan$1 | null);
1296
+ constructor(expression: Expression, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]);
1296
1297
  isEquivalent(e: Expression): boolean;
1297
1298
  isConstant(): boolean;
1298
1299
  visitExpression(visitor: ExpressionVisitor, context: any): any;
@@ -1451,7 +1452,7 @@ declare class RecursiveAstVisitor$1 implements StatementVisitor, ExpressionVisit
1451
1452
  }
1452
1453
  declare function leadingComment(text: string, multiline?: boolean, trailingNewline?: boolean): LeadingComment;
1453
1454
  declare function jsDocComment(tags?: JSDocTag[]): JSDocComment;
1454
- declare function variable(name: string, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null): ReadVarExpr;
1455
+ declare function variable(name: string, type?: Type$1 | null, sourceSpan?: ParseSourceSpan$1 | null, leadingComments?: LeadingComment[]): ReadVarExpr;
1455
1456
  declare function importExpr(id: ExternalReference, typeParams?: Type$1[] | null, sourceSpan?: ParseSourceSpan$1 | null): ExternalExpr;
1456
1457
  declare function importType(id: ExternalReference, typeParams?: Type$1[] | null, typeModifiers?: TypeModifier): ExpressionType | null;
1457
1458
  declare function expressionType(expr: Expression, typeModifiers?: TypeModifier, typeParams?: Type$1[] | null): ExpressionType;
@@ -2914,6 +2915,55 @@ declare class EmitterVisitorContext {
2914
2915
  toSourceMapGenerator(genFilePath: string, startsAtLine?: number): SourceMapGenerator;
2915
2916
  spanOf(line: number, column: number): ParseSourceSpan$1 | null;
2916
2917
  }
2918
+ declare abstract class AbstractEmitterVisitor implements StatementVisitor, ExpressionVisitor, TypeVisitor {
2919
+ protected readonly printComments: boolean;
2920
+ protected readonly printTypes: boolean;
2921
+ private lastIfCondition;
2922
+ constructor(printComments: boolean, printTypes: boolean);
2923
+ abstract visitExternalExpr(ast: ExternalExpr, ctx: EmitterVisitorContext): void;
2924
+ abstract visitWrappedNodeExpr(ast: WrappedNodeExpr<unknown>, ctx: EmitterVisitorContext): void;
2925
+ visitExpressionStmt(stmt: ExpressionStatement, ctx: EmitterVisitorContext): void;
2926
+ visitReturnStmt(stmt: ReturnStatement, ctx: EmitterVisitorContext): void;
2927
+ visitIfStmt(stmt: IfStmt, ctx: EmitterVisitorContext): void;
2928
+ visitDeclareVarStmt(stmt: DeclareVarStmt, ctx: EmitterVisitorContext): void;
2929
+ visitInvokeFunctionExpr(expr: InvokeFunctionExpr, ctx: EmitterVisitorContext): void;
2930
+ visitTaggedTemplateLiteralExpr(expr: TaggedTemplateLiteralExpr, ctx: EmitterVisitorContext): void;
2931
+ visitTemplateLiteralExpr(expr: TemplateLiteralExpr, ctx: EmitterVisitorContext): void;
2932
+ visitTemplateLiteralElementExpr(expr: TemplateLiteralElementExpr, ctx: EmitterVisitorContext): void;
2933
+ visitTypeofExpr(expr: TypeofExpr, ctx: EmitterVisitorContext): void;
2934
+ visitVoidExpr(expr: VoidExpr, ctx: EmitterVisitorContext): void;
2935
+ visitReadVarExpr(ast: ReadVarExpr, ctx: EmitterVisitorContext): void;
2936
+ visitInstantiateExpr(ast: InstantiateExpr, ctx: EmitterVisitorContext): void;
2937
+ visitLiteralExpr(ast: LiteralExpr, ctx: EmitterVisitorContext): void;
2938
+ visitRegularExpressionLiteral(ast: RegularExpressionLiteralExpr, ctx: EmitterVisitorContext): void;
2939
+ visitLocalizedString(ast: LocalizedString, ctx: EmitterVisitorContext): void;
2940
+ visitConditionalExpr(ast: ConditionalExpr, ctx: EmitterVisitorContext): void;
2941
+ visitDynamicImportExpr(ast: DynamicImportExpr, ctx: EmitterVisitorContext): void;
2942
+ visitNotExpr(ast: NotExpr, ctx: EmitterVisitorContext): void;
2943
+ visitFunctionExpr(ast: FunctionExpr, ctx: EmitterVisitorContext): void;
2944
+ visitArrowFunctionExpr(ast: ArrowFunctionExpr, ctx: EmitterVisitorContext): void;
2945
+ visitDeclareFunctionStmt(stmt: DeclareFunctionStmt, ctx: EmitterVisitorContext): void;
2946
+ visitUnaryOperatorExpr(ast: UnaryOperatorExpr, ctx: EmitterVisitorContext): void;
2947
+ visitBinaryOperatorExpr(ast: BinaryOperatorExpr, ctx: EmitterVisitorContext): void;
2948
+ visitReadPropExpr(ast: ReadPropExpr, ctx: EmitterVisitorContext): void;
2949
+ visitReadKeyExpr(ast: ReadKeyExpr, ctx: EmitterVisitorContext): void;
2950
+ visitLiteralArrayExpr(ast: LiteralArrayExpr, ctx: EmitterVisitorContext): void;
2951
+ visitLiteralMapExpr(ast: LiteralMapExpr, ctx: EmitterVisitorContext): void;
2952
+ visitCommaExpr(ast: CommaExpr, ctx: EmitterVisitorContext): void;
2953
+ visitParenthesizedExpr(ast: ParenthesizedExpr, ctx: EmitterVisitorContext): void;
2954
+ visitSpreadElementExpr(ast: SpreadElementExpr, ctx: EmitterVisitorContext): void;
2955
+ visitBuiltinType(type: BuiltinType, ctx: EmitterVisitorContext): void;
2956
+ visitExpressionType(type: ExpressionType, ctx: EmitterVisitorContext): void;
2957
+ visitArrayType(type: ArrayType, ctx: EmitterVisitorContext): void;
2958
+ visitMapType(type: MapType, ctx: EmitterVisitorContext): void;
2959
+ visitTransplantedType(type: TransplantedType<unknown>, ctx: EmitterVisitorContext): void;
2960
+ visitAllExpressions(expressions: Expression[], ctx: EmitterVisitorContext, separator: string): void;
2961
+ visitAllObjects<T>(handler: (t: T) => void, expressions: T[], ctx: EmitterVisitorContext, separator: string): void;
2962
+ visitAllStatements(statements: Statement[], ctx: EmitterVisitorContext): void;
2963
+ protected visitParams(params: FnParam[], ctx: EmitterVisitorContext): void;
2964
+ protected shouldParenthesize(expression: Expression, containingExpression: Expression): boolean;
2965
+ protected printLeadingComments(node: Expression | Statement, ctx: EmitterVisitorContext): void;
2966
+ }
2917
2967
 
2918
2968
  interface ExternalReferenceResolver {
2919
2969
  resolveExternalReference(ref: ExternalReference): unknown;
@@ -5855,5 +5905,5 @@ declare const enum QueryFlags {
5855
5905
  */
5856
5906
  declare function setEnableTemplateSourceLocations(value: boolean): void;
5857
5907
 
5858
- export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, ArrowFunction, ArrowFunctionExpr, ArrowFunctionIdentifierParameter, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingParser, BindingPipe, BindingPipeType, BindingType, Block, BlockParameter, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy$1 as ChangeDetectionStrategy, CombinedRecursiveAstVisitor, CommaExpr, Comment$1 as Comment, CompilerConfig, CompilerFacadeImpl, Component$1 as Component, Conditional, ConditionalExpr, ConstantPool, CssSelector, DYNAMIC_TYPE, DeclarationListEmitMode, DeclareFunctionStmt, DeclareVarStmt, DeferBlockDepsEmitMode, Directive$1 as Directive, DomElementSchemaRegistry, DynamicImportExpr, EOF, Element$1 as Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget, ForwardRefHandling, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, LeadingComment, LetDeclaration$1 as LetDeclaration, Lexer, TokenType$1 as LexerTokenType, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralMapPropertyAssignment, LiteralMapSpreadAssignment, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParenthesizedExpr, ParenthesizedExpression, ParseError, ParseErrorLevel, ParseFlags, ParseLocation, ParseSourceFile, ParseSourceSpan$1 as ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser, PrefixNot, PropertyRead, QueryFlags, Identifiers as R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor$1 as RecursiveVisitor, RegularExpressionLiteral, RegularExpressionLiteralExpr, ResourceLoader, ReturnStatement, SCHEMA, SECURITY_SCHEMA, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, SelectorlessMatcher, Serializer, SplitInterpolation, SpreadElement, SpreadElementExpr, Statement, StmtModifier, StringToken, StringTokenKind, TagContentType, TaggedTemplateLiteral, TaggedTemplateLiteralExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, TemplateLiteralElementExpr, TemplateLiteralExpr, Text$1 as Text, ThisReceiver, BlockNode as TmplAstBlockNode, BoundAttribute as TmplAstBoundAttribute, BoundDeferredTrigger as TmplAstBoundDeferredTrigger, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Component as TmplAstComponent, Content as TmplAstContent, DeferredBlock as TmplAstDeferredBlock, DeferredBlockError as TmplAstDeferredBlockError, DeferredBlockLoading as TmplAstDeferredBlockLoading, DeferredBlockPlaceholder as TmplAstDeferredBlockPlaceholder, DeferredTrigger as TmplAstDeferredTrigger, Directive as TmplAstDirective, Element as TmplAstElement, ForLoopBlock as TmplAstForLoopBlock, ForLoopBlockEmpty as TmplAstForLoopBlockEmpty, HostElement as TmplAstHostElement, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, IfBlock as TmplAstIfBlock, IfBlockBranch as TmplAstIfBlockBranch, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, LetDeclaration as TmplAstLetDeclaration, NeverDeferredTrigger as TmplAstNeverDeferredTrigger, RecursiveVisitor as TmplAstRecursiveVisitor, Reference as TmplAstReference, SwitchBlock as TmplAstSwitchBlock, SwitchBlockCase as TmplAstSwitchBlockCase, SwitchBlockCaseGroup as TmplAstSwitchBlockCaseGroup, SwitchExhaustiveCheck as TmplAstSwitchExhaustiveCheck, Template as TmplAstTemplate, Text as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, UnknownBlock as TmplAstUnknownBlock, Variable as TmplAstVariable, ViewportDeferredTrigger as TmplAstViewportDeferredTrigger, Token, TokenType, TransplantedType, TreeError, Type$1 as Type, TypeModifier, TypeofExpr, TypeofExpression, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation$1 as ViewEncapsulation, VoidExpr, VoidExpression, WrappedNodeExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ATTR_TO_PROP, compileClassDebugInfo, compileClassMetadata, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDeferResolverFunction, compileDirectiveFromMetadata, compileFactoryFunction, compileHmrInitializer, compileHmrUpdateCallback, compileInjectable, compileInjector, compileNgModule, compileOpaqueAsyncClassMetadata, compilePipeFromMetadata, computeMsgId, core_d as core, createCssSelectorFromNode, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, encapsulateStyle, escapeRegExp, findMatchingDirectivesAndPipes, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literal, literalMap, makeBindingParser, mergeNsAndName, output_ast_d as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, setEnableTemplateSourceLocations, splitNsName, visitAll as tmplAstVisitAll, verifyHostBindings, visitAll$1 as visitAll };
5908
+ export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, AbstractEmitterVisitor, ArrayType, ArrowFunction, ArrowFunctionExpr, ArrowFunctionIdentifierParameter, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingParser, BindingPipe, BindingPipeType, BindingType, Block, BlockParameter, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy$1 as ChangeDetectionStrategy, CombinedRecursiveAstVisitor, CommaExpr, Comment$1 as Comment, CompilerConfig, CompilerFacadeImpl, Component$1 as Component, Conditional, ConditionalExpr, ConstantPool, CssSelector, DYNAMIC_TYPE, DeclarationListEmitMode, DeclareFunctionStmt, DeclareVarStmt, DeferBlockDepsEmitMode, Directive$1 as Directive, DomElementSchemaRegistry, DynamicImportExpr, EOF, Element$1 as Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget, ForwardRefHandling, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, LeadingComment, LetDeclaration$1 as LetDeclaration, Lexer, TokenType$1 as LexerTokenType, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralMapPropertyAssignment, LiteralMapSpreadAssignment, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParenthesizedExpr, ParenthesizedExpression, ParseError, ParseErrorLevel, ParseFlags, ParseLocation, ParseSourceFile, ParseSourceSpan$1 as ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser, PrefixNot, PropertyRead, QueryFlags, Identifiers as R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor$1 as RecursiveVisitor, RegularExpressionLiteral, RegularExpressionLiteralExpr, ResourceLoader, ReturnStatement, SCHEMA, SECURITY_SCHEMA, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, SelectorlessMatcher, Serializer, SplitInterpolation, SpreadElement, SpreadElementExpr, Statement, StmtModifier, StringToken, StringTokenKind, TagContentType, TaggedTemplateLiteral, TaggedTemplateLiteralExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, TemplateLiteralElementExpr, TemplateLiteralExpr, Text$1 as Text, ThisReceiver, BlockNode as TmplAstBlockNode, BoundAttribute as TmplAstBoundAttribute, BoundDeferredTrigger as TmplAstBoundDeferredTrigger, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Component as TmplAstComponent, Content as TmplAstContent, DeferredBlock as TmplAstDeferredBlock, DeferredBlockError as TmplAstDeferredBlockError, DeferredBlockLoading as TmplAstDeferredBlockLoading, DeferredBlockPlaceholder as TmplAstDeferredBlockPlaceholder, DeferredTrigger as TmplAstDeferredTrigger, Directive as TmplAstDirective, Element as TmplAstElement, ForLoopBlock as TmplAstForLoopBlock, ForLoopBlockEmpty as TmplAstForLoopBlockEmpty, HostElement as TmplAstHostElement, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, IfBlock as TmplAstIfBlock, IfBlockBranch as TmplAstIfBlockBranch, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, LetDeclaration as TmplAstLetDeclaration, NeverDeferredTrigger as TmplAstNeverDeferredTrigger, RecursiveVisitor as TmplAstRecursiveVisitor, Reference as TmplAstReference, SwitchBlock as TmplAstSwitchBlock, SwitchBlockCase as TmplAstSwitchBlockCase, SwitchBlockCaseGroup as TmplAstSwitchBlockCaseGroup, SwitchExhaustiveCheck as TmplAstSwitchExhaustiveCheck, Template as TmplAstTemplate, Text as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, UnknownBlock as TmplAstUnknownBlock, Variable as TmplAstVariable, ViewportDeferredTrigger as TmplAstViewportDeferredTrigger, Token, TokenType, TransplantedType, TreeError, Type$1 as Type, TypeModifier, TypeofExpr, TypeofExpression, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation$1 as ViewEncapsulation, VoidExpr, VoidExpression, WrappedNodeExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ATTR_TO_PROP, compileClassDebugInfo, compileClassMetadata, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDeferResolverFunction, compileDirectiveFromMetadata, compileFactoryFunction, compileHmrInitializer, compileHmrUpdateCallback, compileInjectable, compileInjector, compileNgModule, compileOpaqueAsyncClassMetadata, compilePipeFromMetadata, computeMsgId, core_d as core, createCssSelectorFromNode, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, encapsulateStyle, escapeRegExp, findMatchingDirectivesAndPipes, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literal, literalMap, makeBindingParser, mergeNsAndName, output_ast_d as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, setEnableTemplateSourceLocations, splitNsName, visitAll as tmplAstVisitAll, verifyHostBindings, visitAll$1 as visitAll };
5859
5909
  export type { ArrowFunctionParameter, AssignmentOperation, AstVisitor, BoundTarget, CompileClassMetadataFn, CompileIdentifierMetadata, DeclareComponentTemplateInfo, DirectiveMatcher, DirectiveMeta, DirectiveOwner, ExpressionVisitor, InputOutputPropertySet, InterpolationPiece, LegacyAnimationTriggerNames, LegacyInputPartialMapping, LexerRange, LiteralMapKey, LiteralMapPropertyKey, LiteralMapSpreadKey, MaybeForwardRefExpression, Node$1 as Node, ParseTemplateOptions, ParsedHostBindings, ParsedTemplate, R3ClassDebugInfo, R3ClassMetadata, R3CompiledExpression, R3ComponentDeferMetadata, R3ComponentMetadata, R3DeclareClassMetadata, R3DeclareClassMetadataAsync, R3DeclareComponentMetadata, R3DeclareDependencyMetadata, R3DeclareDirectiveDependencyMetadata, R3DeclareDirectiveMetadata, R3DeclareFactoryMetadata, R3DeclareHostDirectiveMetadata, R3DeclareInjectableMetadata, R3DeclareInjectorMetadata, R3DeclareNgModuleDependencyMetadata, R3DeclareNgModuleMetadata, R3DeclarePipeDependencyMetadata, R3DeclarePipeMetadata, R3DeclareQueryMetadata, R3DeclareTemplateDependencyMetadata, R3DeferPerBlockDependency, R3DeferPerComponentDependency, R3DeferResolverFunctionMetadata, R3DependencyMetadata, R3DirectiveDependencyMetadata, R3DirectiveMetadata, R3FactoryMetadata, R3HmrMetadata, R3HmrNamespaceDependency, R3HostDirectiveMetadata, R3HostMetadata, R3InjectableMetadata, R3InjectorMetadata, R3InputMetadata, R3NgModuleDependencyMetadata, R3NgModuleMetadata, R3NgModuleMetadataGlobal, R3PartialDeclaration, R3PipeDependencyMetadata, R3PipeMetadata, R3QueryMetadata, R3Reference, R3TemplateDependency, R3TemplateDependencyMetadata, ReferenceTarget, SchemaMetadata, ScopedNode, SourceMap, StatementVisitor, TagDefinition, Target, TargetBinder, TemplateBinding, TemplateBindingIdentifier, TemplateEntity, DeferredBlockTriggers as TmplAstDeferredBlockTriggers, Node as TmplAstNode, Visitor as TmplAstVisitor, TypeVisitor, Visitor$1 as Visitor };