@angular/compiler-cli 17.3.0-rc.0 → 18.0.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.
Files changed (43) hide show
  1. package/bundles/{chunk-Q4UHSSKO.js → chunk-4A7ZWBEL.js} +2 -2
  2. package/bundles/{chunk-MNT5B5MH.js → chunk-64VF23SF.js} +2 -2
  3. package/bundles/{chunk-WYZJV3LZ.js → chunk-A46CQFUG.js} +82 -76
  4. package/bundles/chunk-A46CQFUG.js.map +6 -0
  5. package/bundles/{chunk-E5DF5SRS.js → chunk-NB6ZWAGP.js} +10 -26
  6. package/bundles/chunk-NB6ZWAGP.js.map +6 -0
  7. package/bundles/{chunk-FH3I22MY.js → chunk-SQY7XLGB.js} +196 -142
  8. package/bundles/chunk-SQY7XLGB.js.map +6 -0
  9. package/bundles/{chunk-Q5Y7HH3O.js → chunk-YUMIYLNL.js} +1 -1
  10. package/bundles/{chunk-Q5Y7HH3O.js.map → chunk-YUMIYLNL.js.map} +1 -1
  11. package/bundles/index.js +5 -5
  12. package/bundles/linker/babel/index.js +1 -1
  13. package/bundles/linker/index.js +1 -1
  14. package/bundles/private/migrations.js +2 -2
  15. package/bundles/private/tooling.js +2 -2
  16. package/bundles/src/bin/ng_xi18n.js +4 -4
  17. package/bundles/src/bin/ngc.js +4 -4
  18. package/bundles_metadata.json +1 -1
  19. package/index.d.ts +1 -1
  20. package/linker/src/file_linker/partial_linkers/partial_component_linker_1.d.ts +1 -2
  21. package/linker/src/file_linker/partial_linkers/util.d.ts +1 -2
  22. package/package.json +2 -2
  23. package/src/ngtsc/annotations/component/src/handler.d.ts +4 -4
  24. package/src/ngtsc/annotations/component/src/metadata.d.ts +36 -7
  25. package/src/ngtsc/annotations/directive/src/handler.d.ts +1 -2
  26. package/src/ngtsc/annotations/directive/src/initializer_functions.d.ts +1 -1
  27. package/src/ngtsc/annotations/directive/src/shared.d.ts +1 -1
  28. package/src/ngtsc/core/api/src/public_options.d.ts +0 -4
  29. package/src/ngtsc/core/src/compiler.d.ts +1 -7
  30. package/src/ngtsc/transform/src/api.d.ts +2 -0
  31. package/src/ngtsc/transform/src/compilation.d.ts +1 -2
  32. package/src/ngtsc/typecheck/api/checker.d.ts +6 -1
  33. package/src/ngtsc/typecheck/src/checker.d.ts +2 -1
  34. package/src/ngtsc/typecheck/src/oob.d.ts +1 -3
  35. package/src/ngtsc/typecheck/src/symbol_util.d.ts +10 -0
  36. package/src/ngtsc/typecheck/template_semantics/api/api.d.ts +18 -0
  37. package/src/ngtsc/typecheck/template_semantics/src/template_semantics_checker.d.ts +15 -0
  38. package/bundles/chunk-E5DF5SRS.js.map +0 -6
  39. package/bundles/chunk-FH3I22MY.js.map +0 -6
  40. package/bundles/chunk-WYZJV3LZ.js.map +0 -6
  41. package/src/ngtsc/typecheck/src/template_semantics.d.ts +0 -21
  42. /package/bundles/{chunk-Q4UHSSKO.js.map → chunk-4A7ZWBEL.js.map} +0 -0
  43. /package/bundles/{chunk-MNT5B5MH.js.map → chunk-64VF23SF.js.map} +0 -0
@@ -8,7 +8,7 @@ import {
8
8
  PotentialImportKind,
9
9
  PotentialImportMode,
10
10
  SymbolKind
11
- } from "./chunk-Q5Y7HH3O.js";
11
+ } from "./chunk-YUMIYLNL.js";
12
12
  import {
13
13
  CompilationMode,
14
14
  ComponentDecoratorHandler,
@@ -39,7 +39,7 @@ import {
39
39
  declarationTransformFactory,
40
40
  isHostDirectiveMetaForGlobalMode,
41
41
  ivyTransformFactory
42
- } from "./chunk-WYZJV3LZ.js";
42
+ } from "./chunk-A46CQFUG.js";
43
43
  import {
44
44
  AbsoluteModuleStrategy,
45
45
  AliasStrategy,
@@ -181,7 +181,7 @@ var MemberTags;
181
181
 
182
182
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
183
183
  import { HtmlParser, MessageBundle } from "@angular/compiler";
184
- import ts39 from "typescript";
184
+ import ts40 from "typescript";
185
185
 
186
186
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/i18n.mjs
187
187
  import { Xliff, Xliff2, Xmb } from "@angular/compiler";
@@ -286,7 +286,7 @@ function verifySupportedTypeScriptVersion() {
286
286
  }
287
287
 
288
288
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
289
- import ts37 from "typescript";
289
+ import ts38 from "typescript";
290
290
 
291
291
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
292
292
  var CycleAnalyzer = class {
@@ -3411,8 +3411,8 @@ function constructTypeCtorParameter(env, meta, rawType) {
3411
3411
  const plainKeys = [];
3412
3412
  const coercedKeys = [];
3413
3413
  const signalInputKeys = [];
3414
- for (const { classPropertyName, transform, isSignal: isSignal2 } of meta.fields.inputs) {
3415
- if (isSignal2) {
3414
+ for (const { classPropertyName, transform, isSignal } of meta.fields.inputs) {
3415
+ if (isSignal) {
3416
3416
  signalInputKeys.push(ts23.factory.createLiteralTypeNode(ts23.factory.createStringLiteral(classPropertyName)));
3417
3417
  } else if (!meta.coercedInputFields.has(classPropertyName)) {
3418
3418
  plainKeys.push(ts23.factory.createLiteralTypeNode(ts23.factory.createStringLiteral(classPropertyName)));
@@ -3603,21 +3603,6 @@ var OutOfBandDiagnosticRecorderImpl = class {
3603
3603
  }
3604
3604
  this._diagnostics.push(makeTemplateDiagnostic(templateId, mapping, sourceSpan, ts25.DiagnosticCategory.Error, ngErrorCode(ErrorCode.DEFERRED_DIRECTIVE_USED_EAGERLY), errorMsg));
3605
3605
  }
3606
- illegalAssignmentToTemplateVar(templateId, assignment, target) {
3607
- var _a, _b;
3608
- const mapping = this.resolver.getSourceMapping(templateId);
3609
- const errorMsg = `Cannot use variable '${assignment.name}' as the left-hand side of an assignment expression. Template variables are read-only.`;
3610
- const sourceSpan = this.resolver.toParseSourceSpan(templateId, assignment.sourceSpan);
3611
- if (sourceSpan === null) {
3612
- throw new Error(`Assertion failure: no SourceLocation found for property binding.`);
3613
- }
3614
- this._diagnostics.push(makeTemplateDiagnostic(templateId, mapping, sourceSpan, ts25.DiagnosticCategory.Error, ngErrorCode(ErrorCode.WRITE_TO_READ_ONLY_VARIABLE), errorMsg, [{
3615
- text: `The variable ${assignment.name} is declared here.`,
3616
- start: ((_a = target.valueSpan) == null ? void 0 : _a.start.offset) || target.sourceSpan.start.offset,
3617
- end: ((_b = target.valueSpan) == null ? void 0 : _b.end.offset) || target.sourceSpan.end.offset,
3618
- sourceFile: mapping.node.getSourceFile()
3619
- }]));
3620
- }
3621
3606
  duplicateTemplateVar(templateId, variable, firstDecl) {
3622
3607
  const mapping = this.resolver.getSourceMapping(templateId);
3623
3608
  const errorMsg = `Cannot redeclare variable '${variable.name}' as it was previously declared elsewhere for the same template.`;
@@ -3769,7 +3754,7 @@ var TypeCheckShimGenerator = class {
3769
3754
  };
3770
3755
 
3771
3756
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
3772
- import { BindingPipe, Call as Call2, createCssSelectorFromNode, CssSelector, DYNAMIC_TYPE, ImplicitReceiver as ImplicitReceiver4, PropertyRead as PropertyRead4, PropertyWrite as PropertyWrite3, R3Identifiers as R3Identifiers3, SafeCall, SafePropertyRead as SafePropertyRead3, SelectorMatcher, ThisReceiver, TmplAstBoundAttribute, TmplAstBoundText, TmplAstDeferredBlock, TmplAstElement as TmplAstElement3, TmplAstForLoopBlock as TmplAstForLoopBlock2, TmplAstIcu, TmplAstIfBlock, TmplAstIfBlockBranch, TmplAstReference as TmplAstReference3, TmplAstSwitchBlock, TmplAstTemplate as TmplAstTemplate2, TmplAstText, TmplAstTextAttribute as TmplAstTextAttribute2, TmplAstVariable as TmplAstVariable2, TransplantedType } from "@angular/compiler";
3757
+ import { BindingPipe, BindingType, Call as Call2, createCssSelectorFromNode, CssSelector, DYNAMIC_TYPE, ImplicitReceiver as ImplicitReceiver3, ParsedEventType, PropertyRead as PropertyRead4, PropertyWrite as PropertyWrite3, R3Identifiers as R3Identifiers3, SafeCall, SafePropertyRead as SafePropertyRead3, SelectorMatcher, ThisReceiver, TmplAstBoundAttribute, TmplAstBoundText, TmplAstDeferredBlock, TmplAstElement as TmplAstElement3, TmplAstForLoopBlock as TmplAstForLoopBlock2, TmplAstIcu, TmplAstIfBlock, TmplAstIfBlockBranch, TmplAstReference as TmplAstReference3, TmplAstSwitchBlock, TmplAstTemplate as TmplAstTemplate2, TmplAstText, TmplAstTextAttribute as TmplAstTextAttribute2, TmplAstVariable, TransplantedType } from "@angular/compiler";
3773
3758
  import ts29 from "typescript";
3774
3759
 
3775
3760
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/diagnostics.mjs
@@ -4151,30 +4136,6 @@ var VeSafeLhsInferenceBugDetector = _VeSafeLhsInferenceBugDetector;
4151
4136
  _VeSafeLhsInferenceBugDetector.SINGLETON = new _VeSafeLhsInferenceBugDetector();
4152
4137
  })();
4153
4138
 
4154
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_semantics.mjs
4155
- import { ImplicitReceiver as ImplicitReceiver3, RecursiveAstVisitor as RecursiveAstVisitor2, TmplAstVariable } from "@angular/compiler";
4156
- var ExpressionSemanticVisitor = class extends RecursiveAstVisitor2 {
4157
- constructor(templateId, boundTarget, oob) {
4158
- super();
4159
- this.templateId = templateId;
4160
- this.boundTarget = boundTarget;
4161
- this.oob = oob;
4162
- }
4163
- visitPropertyWrite(ast, context) {
4164
- super.visitPropertyWrite(ast, context);
4165
- if (!(ast.receiver instanceof ImplicitReceiver3)) {
4166
- return;
4167
- }
4168
- const target = this.boundTarget.getExpressionTarget(ast);
4169
- if (target instanceof TmplAstVariable) {
4170
- this.oob.illegalAssignmentToTemplateVar(this.templateId, ast, target);
4171
- }
4172
- }
4173
- static visit(ast, id, boundTarget, oob) {
4174
- ast.visit(new ExpressionSemanticVisitor(id, boundTarget, oob));
4175
- }
4176
- };
4177
-
4178
4139
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
4179
4140
  var TcbGenericContextBehavior;
4180
4141
  (function(TcbGenericContextBehavior2) {
@@ -4530,7 +4491,7 @@ var TcbDirectiveInputsOp = class extends TcbOp {
4530
4491
  for (const attr of boundAttrs) {
4531
4492
  const expr = widenBinding(translateInput(attr.attribute, this.tcb, this.scope), this.tcb);
4532
4493
  let assignment = wrapForDiagnostics(expr);
4533
- for (const { fieldName, required, transformType, isSignal: isSignal2, isTwoWayBinding } of attr.inputs) {
4494
+ for (const { fieldName, required, transformType, isSignal, isTwoWayBinding } of attr.inputs) {
4534
4495
  let target;
4535
4496
  if (required) {
4536
4497
  seenRequiredInputs.add(fieldName);
@@ -4570,7 +4531,7 @@ var TcbDirectiveInputsOp = class extends TcbOp {
4570
4531
  }
4571
4532
  target = this.dir.stringLiteralInputFields.has(fieldName) ? ts29.factory.createElementAccessExpression(dirId, ts29.factory.createStringLiteral(fieldName)) : ts29.factory.createPropertyAccessExpression(dirId, ts29.factory.createIdentifier(fieldName));
4572
4533
  }
4573
- if (isSignal2) {
4534
+ if (isSignal) {
4574
4535
  const inputSignalBrandWriteSymbol = this.tcb.env.referenceExternalSymbol(R3Identifiers3.InputSignalBrandWriteType.moduleName, R3Identifiers3.InputSignalBrandWriteType.name);
4575
4536
  if (!ts29.isIdentifier(inputSignalBrandWriteSymbol) && !ts29.isPropertyAccessExpression(inputSignalBrandWriteSymbol)) {
4576
4537
  throw new Error(`Expected identifier or property access for reference to ${R3Identifiers3.InputSignalBrandWriteType.name}`);
@@ -4642,7 +4603,7 @@ var TcbDomSchemaCheckerOp = class extends TcbOp {
4642
4603
  this.tcb.domSchemaChecker.checkElement(this.tcb.id, this.element, this.tcb.schemas, this.tcb.hostIsStandalone);
4643
4604
  }
4644
4605
  for (const binding of this.element.inputs) {
4645
- const isPropertyBinding = binding.type === 0 || binding.type === 5;
4606
+ const isPropertyBinding = binding.type === BindingType.Property || binding.type === BindingType.TwoWay;
4646
4607
  if (isPropertyBinding && this.claimedInputs.has(binding.name)) {
4647
4608
  continue;
4648
4609
  }
@@ -4750,7 +4711,7 @@ var TcbUnclaimedInputsOp = class extends TcbOp {
4750
4711
  var _a;
4751
4712
  let elId = null;
4752
4713
  for (const binding of this.element.inputs) {
4753
- const isPropertyBinding = binding.type === 0 || binding.type === 5;
4714
+ const isPropertyBinding = binding.type === BindingType.Property || binding.type === BindingType.TwoWay;
4754
4715
  if (isPropertyBinding && this.claimedInputs.has(binding.name)) {
4755
4716
  continue;
4756
4717
  }
@@ -4790,7 +4751,7 @@ var TcbDirectiveOutputsOp = class extends TcbOp {
4790
4751
  let dirId = null;
4791
4752
  const outputs = this.dir.outputs;
4792
4753
  for (const output of this.node.outputs) {
4793
- if (output.type === 1 || !outputs.hasBindingPropertyName(output.name)) {
4754
+ if (output.type === ParsedEventType.Animation || !outputs.hasBindingPropertyName(output.name)) {
4794
4755
  continue;
4795
4756
  }
4796
4757
  if (this.tcb.env.config.checkTypeOfOutputEvents && output.name.endsWith("Change")) {
@@ -4814,7 +4775,6 @@ var TcbDirectiveOutputsOp = class extends TcbOp {
4814
4775
  const handler = tcbCreateEventHandler(output, this.tcb, this.scope, 1);
4815
4776
  this.scope.addStatement(ts29.factory.createExpressionStatement(handler));
4816
4777
  }
4817
- ExpressionSemanticVisitor.visit(output.handler, this.tcb.id, this.tcb.boundTarget, this.tcb.oobRecorder);
4818
4778
  }
4819
4779
  return null;
4820
4780
  }
@@ -4842,7 +4802,7 @@ var TcbUnclaimedOutputsOp = class extends TcbOp {
4842
4802
  continue;
4843
4803
  }
4844
4804
  }
4845
- if (output.type === 1) {
4805
+ if (output.type === ParsedEventType.Animation) {
4846
4806
  const eventType = this.tcb.env.config.checkTypeOfAnimationEvents ? this.tcb.env.referenceExternalType("@angular/animations", "AnimationEvent") : 1;
4847
4807
  const handler = tcbCreateEventHandler(output, this.tcb, this.scope, eventType);
4848
4808
  this.scope.addStatement(ts29.factory.createExpressionStatement(handler));
@@ -4864,7 +4824,6 @@ var TcbUnclaimedOutputsOp = class extends TcbOp {
4864
4824
  const handler = tcbCreateEventHandler(output, this.tcb, this.scope, 1);
4865
4825
  this.scope.addStatement(ts29.factory.createExpressionStatement(handler));
4866
4826
  }
4867
- ExpressionSemanticVisitor.visit(output.handler, this.tcb.id, this.tcb.boundTarget, this.tcb.oobRecorder);
4868
4827
  }
4869
4828
  return null;
4870
4829
  }
@@ -5191,7 +5150,7 @@ var _Scope = class {
5191
5150
  resolveLocal(ref, directive) {
5192
5151
  if (ref instanceof TmplAstReference3 && this.referenceOpMap.has(ref)) {
5193
5152
  return this.resolveOp(this.referenceOpMap.get(ref));
5194
- } else if (ref instanceof TmplAstVariable2 && this.varMap.has(ref)) {
5153
+ } else if (ref instanceof TmplAstVariable && this.varMap.has(ref)) {
5195
5154
  const opIndexOrNode = this.varMap.get(ref);
5196
5155
  return typeof opIndexOrNode === "number" ? this.resolveOp(opIndexOrNode) : opIndexOrNode;
5197
5156
  } else if (ref instanceof TmplAstTemplate2 && directive === void 0 && this.templateCtxOpMap.has(ref)) {
@@ -5464,9 +5423,9 @@ var TcbExpressionTranslator = class {
5464
5423
  return astToTypescript(ast, (ast2) => this.resolve(ast2), this.tcb.env.config);
5465
5424
  }
5466
5425
  resolve(ast) {
5467
- if (ast instanceof PropertyRead4 && ast.receiver instanceof ImplicitReceiver4) {
5426
+ if (ast instanceof PropertyRead4 && ast.receiver instanceof ImplicitReceiver3) {
5468
5427
  return this.resolveTarget(ast);
5469
- } else if (ast instanceof PropertyWrite3 && ast.receiver instanceof ImplicitReceiver4) {
5428
+ } else if (ast instanceof PropertyWrite3 && ast.receiver instanceof ImplicitReceiver3) {
5470
5429
  const target = this.resolveTarget(ast);
5471
5430
  if (target === null) {
5472
5431
  return null;
@@ -5475,7 +5434,7 @@ var TcbExpressionTranslator = class {
5475
5434
  const result = ts29.factory.createParenthesizedExpression(ts29.factory.createBinaryExpression(target, ts29.SyntaxKind.EqualsToken, expr));
5476
5435
  addParseSpanInfo(result, ast.sourceSpan);
5477
5436
  return result;
5478
- } else if (ast instanceof ImplicitReceiver4) {
5437
+ } else if (ast instanceof ImplicitReceiver3) {
5479
5438
  return ts29.factory.createThis();
5480
5439
  } else if (ast instanceof BindingPipe) {
5481
5440
  const expr = this.translate(ast.exp);
@@ -5504,7 +5463,7 @@ var TcbExpressionTranslator = class {
5504
5463
  addParseSpanInfo(result, ast.sourceSpan);
5505
5464
  return result;
5506
5465
  } else if ((ast instanceof Call2 || ast instanceof SafeCall) && (ast.receiver instanceof PropertyRead4 || ast.receiver instanceof SafePropertyRead3)) {
5507
- if (ast.receiver.receiver instanceof ImplicitReceiver4 && !(ast.receiver.receiver instanceof ThisReceiver) && ast.receiver.name === "$any" && ast.args.length === 1) {
5466
+ if (ast.receiver.receiver instanceof ImplicitReceiver3 && !(ast.receiver.receiver instanceof ThisReceiver) && ast.receiver.name === "$any" && ast.args.length === 1) {
5508
5467
  const expr = this.translate(ast.args[0]);
5509
5468
  const exprAsAny = ts29.factory.createAsExpression(expr, ts29.factory.createKeywordTypeNode(ts29.SyntaxKind.AnyKeyword));
5510
5469
  const result = ts29.factory.createParenthesizedExpression(exprAsAny);
@@ -5560,7 +5519,7 @@ function tcbCallTypeCtor(dir, tcb, inputs) {
5560
5519
  function getBoundAttributes(directive, node) {
5561
5520
  const boundInputs = [];
5562
5521
  const processAttribute = (attr) => {
5563
- if (attr instanceof TmplAstBoundAttribute && attr.type !== 0 && attr.type !== 5) {
5522
+ if (attr instanceof TmplAstBoundAttribute && attr.type !== BindingType.Property && attr.type !== BindingType.TwoWay) {
5564
5523
  return;
5565
5524
  }
5566
5525
  const inputs = directive.inputs.getByBindingPropertyName(attr.name);
@@ -5574,7 +5533,7 @@ function getBoundAttributes(directive, node) {
5574
5533
  required: input.required,
5575
5534
  transformType: ((_a = input.transform) == null ? void 0 : _a.type) || null,
5576
5535
  isSignal: input.isSignal,
5577
- isTwoWayBinding: attr instanceof TmplAstBoundAttribute && attr.type === 5
5536
+ isTwoWayBinding: attr instanceof TmplAstBoundAttribute && attr.type === BindingType.TwoWay
5578
5537
  };
5579
5538
  })
5580
5539
  });
@@ -5669,7 +5628,7 @@ function isSplitTwoWayBinding(inputName, output, inputs, tcb) {
5669
5628
  }
5670
5629
  var TcbEventHandlerTranslator = class extends TcbExpressionTranslator {
5671
5630
  resolve(ast) {
5672
- if (ast instanceof PropertyRead4 && ast.receiver instanceof ImplicitReceiver4 && !(ast.receiver instanceof ThisReceiver) && ast.name === EVENT_PARAMETER) {
5631
+ if (ast instanceof PropertyRead4 && ast.receiver instanceof ImplicitReceiver3 && !(ast.receiver instanceof ThisReceiver) && ast.name === EVENT_PARAMETER) {
5673
5632
  const event = ts29.factory.createIdentifier(EVENT_PARAMETER);
5674
5633
  addParseSpanInfo(event, ast.nameSpan);
5675
5634
  return event;
@@ -5683,7 +5642,7 @@ var TcbForLoopTrackTranslator = class extends TcbExpressionTranslator {
5683
5642
  this.block = block;
5684
5643
  }
5685
5644
  resolve(ast) {
5686
- if (ast instanceof PropertyRead4 && ast.receiver instanceof ImplicitReceiver4) {
5645
+ if (ast instanceof PropertyRead4 && ast.receiver instanceof ImplicitReceiver3) {
5687
5646
  const target = this.tcb.boundTarget.getExpressionTarget(ast);
5688
5647
  if (target !== null && target !== this.block.item && target !== this.block.contextVariables.$index) {
5689
5648
  this.tcb.oobRecorder.illegalForLoopTrackAccess(this.tcb.id, this.block, ast);
@@ -6066,7 +6025,7 @@ var TemplateSourceManager = class {
6066
6025
  };
6067
6026
 
6068
6027
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.mjs
6069
- import { AST, ASTWithSource as ASTWithSource3, BindingPipe as BindingPipe2, PropertyRead as PropertyRead5, PropertyWrite as PropertyWrite4, R3Identifiers as R3Identifiers4, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent, TmplAstElement as TmplAstElement4, TmplAstReference as TmplAstReference4, TmplAstTemplate as TmplAstTemplate3, TmplAstTextAttribute as TmplAstTextAttribute3, TmplAstVariable as TmplAstVariable3 } from "@angular/compiler";
6028
+ import { AST, ASTWithSource as ASTWithSource3, BindingPipe as BindingPipe2, PropertyRead as PropertyRead5, PropertyWrite as PropertyWrite4, R3Identifiers as R3Identifiers4, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent, TmplAstElement as TmplAstElement4, TmplAstReference as TmplAstReference4, TmplAstTemplate as TmplAstTemplate3, TmplAstTextAttribute as TmplAstTextAttribute3, TmplAstVariable as TmplAstVariable2 } from "@angular/compiler";
6070
6029
  import ts32 from "typescript";
6071
6030
  var SymbolBuilder = class {
6072
6031
  constructor(tcbPath, tcbIsShim, typeCheckBlock, templateData, componentScopeReader, getTypeChecker) {
@@ -6091,7 +6050,7 @@ var SymbolBuilder = class {
6091
6050
  symbol = this.getSymbolOfElement(node);
6092
6051
  } else if (node instanceof TmplAstTemplate3) {
6093
6052
  symbol = this.getSymbolOfAstTemplate(node);
6094
- } else if (node instanceof TmplAstVariable3) {
6053
+ } else if (node instanceof TmplAstVariable2) {
6095
6054
  symbol = this.getSymbolOfVariable(node);
6096
6055
  } else if (node instanceof TmplAstReference4) {
6097
6056
  symbol = this.getSymbolOfReference(node);
@@ -6794,6 +6753,10 @@ var TemplateTypeCheckerImpl = class {
6794
6753
  fileData.isComplete = false;
6795
6754
  this.isComplete = false;
6796
6755
  }
6756
+ getExpressionTarget(expression, clazz) {
6757
+ var _a;
6758
+ return ((_a = this.getLatestComponentState(clazz).data) == null ? void 0 : _a.boundTarget.getExpressionTarget(expression)) || null;
6759
+ }
6797
6760
  makeTemplateDiagnostic(clazz, sourceSpan, category, errorCode, message, relatedInformation) {
6798
6761
  const sfPath = absoluteFromSourceFile(clazz.getSourceFile());
6799
6762
  const fileRecord = this.state.get(sfPath);
@@ -7282,17 +7245,36 @@ var SingleShimTypeCheckingHost = class extends SingleFileTypeCheckingHost {
7282
7245
 
7283
7246
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.mjs
7284
7247
  import { Interpolation, PropertyRead as PropertyRead6 } from "@angular/compiler";
7248
+
7249
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/symbol_util.mjs
7285
7250
  import ts33 from "typescript";
7251
+ var SIGNAL_FNS = /* @__PURE__ */ new Set([
7252
+ "WritableSignal",
7253
+ "Signal",
7254
+ "InputSignal",
7255
+ "InputSignalWithTransform",
7256
+ "ModelSignal"
7257
+ ]);
7258
+ function isSignalReference(symbol) {
7259
+ return (symbol.kind === SymbolKind.Expression || symbol.kind === SymbolKind.Variable) && (symbol.tsType.symbol !== void 0 && isSignalSymbol(symbol.tsType.symbol) || symbol.tsType.aliasSymbol !== void 0 && isSignalSymbol(symbol.tsType.aliasSymbol));
7260
+ }
7261
+ function isSignalSymbol(symbol) {
7262
+ const declarations = symbol.getDeclarations();
7263
+ return declarations !== void 0 && declarations.some((decl) => {
7264
+ const fileName = decl.getSourceFile().fileName;
7265
+ return (ts33.isInterfaceDeclaration(decl) || ts33.isTypeAliasDeclaration(decl)) && SIGNAL_FNS.has(decl.name.text) && (fileName.includes("@angular/core") || fileName.includes("angular2/rc/packages/core"));
7266
+ });
7267
+ }
7286
7268
 
7287
7269
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/api/api.mjs
7288
- import { ASTWithSource as ASTWithSource4, RecursiveAstVisitor as RecursiveAstVisitor3, TmplAstBoundDeferredTrigger as TmplAstBoundDeferredTrigger2 } from "@angular/compiler";
7270
+ import { ASTWithSource as ASTWithSource4, RecursiveAstVisitor as RecursiveAstVisitor2, TmplAstBoundDeferredTrigger as TmplAstBoundDeferredTrigger2 } from "@angular/compiler";
7289
7271
  var TemplateCheckWithVisitor = class {
7290
7272
  run(ctx, component, template) {
7291
7273
  const visitor = new TemplateVisitor2(ctx, component, this);
7292
7274
  return visitor.getDiagnostics(template);
7293
7275
  }
7294
7276
  };
7295
- var TemplateVisitor2 = class extends RecursiveAstVisitor3 {
7277
+ var TemplateVisitor2 = class extends RecursiveAstVisitor2 {
7296
7278
  constructor(ctx, component, check) {
7297
7279
  super();
7298
7280
  this.ctx = ctx;
@@ -7409,13 +7391,6 @@ var TemplateVisitor2 = class extends RecursiveAstVisitor3 {
7409
7391
  };
7410
7392
 
7411
7393
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.mjs
7412
- var SIGNAL_FNS = /* @__PURE__ */ new Set([
7413
- "WritableSignal",
7414
- "Signal",
7415
- "InputSignal",
7416
- "InputSignalWithTransform",
7417
- "ModelSignal"
7418
- ]);
7419
7394
  var SIGNAL_INSTANCE_PROPERTIES = /* @__PURE__ */ new Set(["set", "update", "asReadonly"]);
7420
7395
  var FUNCTION_INSTANCE_PROPERTIES = /* @__PURE__ */ new Set(["name", "length", "prototype"]);
7421
7396
  var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
@@ -7430,13 +7405,6 @@ var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
7430
7405
  return [];
7431
7406
  }
7432
7407
  };
7433
- function isSignal(symbol) {
7434
- const declarations = symbol == null ? void 0 : symbol.getDeclarations();
7435
- return declarations !== void 0 && declarations.some((decl) => {
7436
- const fileName = decl.getSourceFile().fileName;
7437
- return (ts33.isInterfaceDeclaration(decl) || ts33.isTypeAliasDeclaration(decl)) && SIGNAL_FNS.has(decl.name.text) && (fileName.includes("@angular/core") || fileName.includes("angular2/rc/packages/core"));
7438
- });
7439
- }
7440
7408
  function isFunctionInstanceProperty(name) {
7441
7409
  return FUNCTION_INSTANCE_PROPERTIES.has(name);
7442
7410
  }
@@ -7445,14 +7413,14 @@ function isSignalInstanceProperty(name) {
7445
7413
  }
7446
7414
  function buildDiagnosticForSignal(ctx, node, component) {
7447
7415
  const symbol = ctx.templateTypeChecker.getSymbolOfNode(node, component);
7448
- if ((symbol == null ? void 0 : symbol.kind) === SymbolKind.Expression && (isSignal(symbol.tsType.symbol) || isSignal(symbol.tsType.aliasSymbol))) {
7416
+ if (symbol !== null && symbol.kind === SymbolKind.Expression && isSignalReference(symbol)) {
7449
7417
  const templateMapping = ctx.templateTypeChecker.getTemplateMappingAtTcbLocation(symbol.tcbLocation);
7450
7418
  const errorString = `${node.name} is a function and should be invoked: ${node.name}()`;
7451
7419
  const diagnostic = ctx.makeTemplateDiagnostic(templateMapping.span, errorString);
7452
7420
  return [diagnostic];
7453
7421
  }
7454
7422
  const symbolOfReceiver = ctx.templateTypeChecker.getSymbolOfNode(node.receiver, component);
7455
- if ((isFunctionInstanceProperty(node.name) || isSignalInstanceProperty(node.name)) && (symbolOfReceiver == null ? void 0 : symbolOfReceiver.kind) === SymbolKind.Expression && (isSignal(symbolOfReceiver.tsType.symbol) || isSignal(symbolOfReceiver.tsType.aliasSymbol))) {
7423
+ if ((isFunctionInstanceProperty(node.name) || isSignalInstanceProperty(node.name)) && symbolOfReceiver !== null && symbolOfReceiver.kind === SymbolKind.Expression && isSignalReference(symbolOfReceiver)) {
7456
7424
  const templateMapping = ctx.templateTypeChecker.getTemplateMappingAtTcbLocation(symbolOfReceiver.tcbLocation);
7457
7425
  const errorString = `${node.receiver.name} is a function and should be invoked: ${node.receiver.name}()`;
7458
7426
  const diagnostic = ctx.makeTemplateDiagnostic(templateMapping.span, errorString);
@@ -7804,6 +7772,88 @@ var SUPPORTED_DIAGNOSTIC_NAMES = /* @__PURE__ */ new Set([
7804
7772
  ...ALL_DIAGNOSTIC_FACTORIES.map((factory9) => factory9.name)
7805
7773
  ]);
7806
7774
 
7775
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/template_semantics/src/template_semantics_checker.mjs
7776
+ import { ASTWithSource as ASTWithSource5, ImplicitReceiver as ImplicitReceiver4, ParsedEventType as ParsedEventType2, RecursiveAstVisitor as RecursiveAstVisitor3, TmplAstBoundEvent as TmplAstBoundEvent3, TmplAstRecursiveVisitor as TmplAstRecursiveVisitor2, TmplAstVariable as TmplAstVariable3 } from "@angular/compiler";
7777
+ import ts37 from "typescript";
7778
+ var TemplateSemanticsCheckerImpl = class {
7779
+ constructor(templateTypeChecker) {
7780
+ this.templateTypeChecker = templateTypeChecker;
7781
+ }
7782
+ getDiagnosticsForComponent(component) {
7783
+ const template = this.templateTypeChecker.getTemplate(component);
7784
+ return template !== null ? TemplateSemanticsVisitor.visit(template, component, this.templateTypeChecker) : [];
7785
+ }
7786
+ };
7787
+ var TemplateSemanticsVisitor = class extends TmplAstRecursiveVisitor2 {
7788
+ constructor(expressionVisitor) {
7789
+ super();
7790
+ this.expressionVisitor = expressionVisitor;
7791
+ }
7792
+ static visit(nodes, component, templateTypeChecker) {
7793
+ const diagnostics = [];
7794
+ const expressionVisitor = new ExpressionsSemanticsVisitor(templateTypeChecker, component, diagnostics);
7795
+ const templateVisitor = new TemplateSemanticsVisitor(expressionVisitor);
7796
+ nodes.forEach((node) => node.visit(templateVisitor));
7797
+ return diagnostics;
7798
+ }
7799
+ visitBoundEvent(event) {
7800
+ super.visitBoundEvent(event);
7801
+ event.handler.visit(this.expressionVisitor, event);
7802
+ }
7803
+ };
7804
+ var ExpressionsSemanticsVisitor = class extends RecursiveAstVisitor3 {
7805
+ constructor(templateTypeChecker, component, diagnostics) {
7806
+ super();
7807
+ this.templateTypeChecker = templateTypeChecker;
7808
+ this.component = component;
7809
+ this.diagnostics = diagnostics;
7810
+ }
7811
+ visitPropertyWrite(ast, context) {
7812
+ super.visitPropertyWrite(ast, context);
7813
+ this.checkForIllegalWriteInEventBinding(ast, context);
7814
+ }
7815
+ visitPropertyRead(ast, context) {
7816
+ super.visitPropertyRead(ast, context);
7817
+ this.checkForIllegalWriteInTwoWayBinding(ast, context);
7818
+ }
7819
+ checkForIllegalWriteInEventBinding(ast, context) {
7820
+ if (!(context instanceof TmplAstBoundEvent3) || !(ast.receiver instanceof ImplicitReceiver4)) {
7821
+ return;
7822
+ }
7823
+ const target = this.templateTypeChecker.getExpressionTarget(ast, this.component);
7824
+ if (target instanceof TmplAstVariable3) {
7825
+ const errorMessage = `Cannot use variable '${target.name}' as the left-hand side of an assignment expression. Template variables are read-only.`;
7826
+ this.diagnostics.push(this.makeIllegalTemplateVarDiagnostic(target, context, errorMessage));
7827
+ }
7828
+ }
7829
+ checkForIllegalWriteInTwoWayBinding(ast, context) {
7830
+ if (!(context instanceof TmplAstBoundEvent3) || context.type !== ParsedEventType2.TwoWay || !(ast.receiver instanceof ImplicitReceiver4) || ast !== unwrapAstWithSource(context.handler)) {
7831
+ return;
7832
+ }
7833
+ const target = this.templateTypeChecker.getExpressionTarget(ast, this.component);
7834
+ if (!(target instanceof TmplAstVariable3)) {
7835
+ return;
7836
+ }
7837
+ const symbol = this.templateTypeChecker.getSymbolOfNode(target, this.component);
7838
+ if (symbol !== null && !isSignalReference(symbol)) {
7839
+ const errorMessage = `Cannot use a non-signal variable '${target.name}' in a two-way binding expression. Template variables are read-only.`;
7840
+ this.diagnostics.push(this.makeIllegalTemplateVarDiagnostic(target, context, errorMessage));
7841
+ }
7842
+ }
7843
+ makeIllegalTemplateVarDiagnostic(target, expressionNode, errorMessage) {
7844
+ var _a, _b;
7845
+ return this.templateTypeChecker.makeTemplateDiagnostic(this.component, expressionNode.handlerSpan, ts37.DiagnosticCategory.Error, ngErrorCode(ErrorCode.WRITE_TO_READ_ONLY_VARIABLE), errorMessage, [{
7846
+ text: `The variable ${target.name} is declared here.`,
7847
+ start: ((_a = target.valueSpan) == null ? void 0 : _a.start.offset) || target.sourceSpan.start.offset,
7848
+ end: ((_b = target.valueSpan) == null ? void 0 : _b.end.offset) || target.sourceSpan.end.offset,
7849
+ sourceFile: this.component.getSourceFile()
7850
+ }]);
7851
+ }
7852
+ };
7853
+ function unwrapAstWithSource(ast) {
7854
+ return ast instanceof ASTWithSource5 ? ast.ast : ast;
7855
+ }
7856
+
7807
7857
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/feature_detection.mjs
7808
7858
  import semver from "semver";
7809
7859
  function coreVersionSupportsFeature(coreVersion, minVersion) {
@@ -7814,7 +7864,6 @@ function coreVersionSupportsFeature(coreVersion, minVersion) {
7814
7864
  }
7815
7865
 
7816
7866
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
7817
- var SHOULD_USE_TEMPLATE_PIPELINE = true;
7818
7867
  var CompilationTicketKind;
7819
7868
  (function(CompilationTicketKind2) {
7820
7869
  CompilationTicketKind2[CompilationTicketKind2["Fresh"] = 0] = "Fresh";
@@ -7906,7 +7955,7 @@ var NgCompiler = class {
7906
7955
  this.currentProgram = inputProgram;
7907
7956
  this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
7908
7957
  this.entryPoint = adapter.entryPoint !== null ? getSourceFileOrNull(inputProgram, adapter.entryPoint) : null;
7909
- const moduleResolutionCache = ts37.createModuleResolutionCache(
7958
+ const moduleResolutionCache = ts38.createModuleResolutionCache(
7910
7959
  this.adapter.getCurrentDirectory(),
7911
7960
  this.adapter.getCanonicalFileName.bind(this.adapter)
7912
7961
  );
@@ -7950,7 +7999,7 @@ var NgCompiler = class {
7950
7999
  }
7951
8000
  for (const clazz of classesToUpdate) {
7952
8001
  this.compilation.traitCompiler.updateResources(clazz);
7953
- if (!ts37.isClassDeclaration(clazz)) {
8002
+ if (!ts38.isClassDeclaration(clazz)) {
7954
8003
  continue;
7955
8004
  }
7956
8005
  this.compilation.templateTypeChecker.invalidateClass(clazz);
@@ -7966,10 +8015,7 @@ var NgCompiler = class {
7966
8015
  ...this.getNonTemplateDiagnostics()
7967
8016
  ];
7968
8017
  try {
7969
- diagnostics.push(...this.getTemplateDiagnostics());
7970
- if (this.options.strictTemplates) {
7971
- diagnostics.push(...this.getExtendedTemplateDiagnostics());
7972
- }
8018
+ diagnostics.push(...this.getTemplateDiagnostics(), ...this.runAdditionalChecks());
7973
8019
  } catch (err) {
7974
8020
  if (!isFatalDiagnosticError(err)) {
7975
8021
  throw err;
@@ -7981,10 +8027,7 @@ var NgCompiler = class {
7981
8027
  getDiagnosticsForFile(file, optimizeFor) {
7982
8028
  const diagnostics = [...this.getNonTemplateDiagnostics().filter((diag) => diag.file === file)];
7983
8029
  try {
7984
- diagnostics.push(...this.getTemplateDiagnosticsForFile(file, optimizeFor));
7985
- if (this.options.strictTemplates) {
7986
- diagnostics.push(...this.getExtendedTemplateDiagnostics(file));
7987
- }
8030
+ diagnostics.push(...this.getTemplateDiagnosticsForFile(file, optimizeFor), ...this.runAdditionalChecks(file));
7988
8031
  } catch (err) {
7989
8032
  if (!isFatalDiagnosticError(err)) {
7990
8033
  throw err;
@@ -7999,8 +8042,11 @@ var NgCompiler = class {
7999
8042
  const diagnostics = [];
8000
8043
  try {
8001
8044
  diagnostics.push(...ttc.getDiagnosticsForComponent(component));
8002
- const extendedTemplateChecker = compilation.extendedTemplateChecker;
8003
- if (this.options.strictTemplates && extendedTemplateChecker) {
8045
+ const { extendedTemplateChecker, templateSemanticsChecker } = compilation;
8046
+ if (templateSemanticsChecker !== null) {
8047
+ diagnostics.push(...templateSemanticsChecker.getDiagnosticsForComponent(component));
8048
+ }
8049
+ if (this.options.strictTemplates && extendedTemplateChecker !== null) {
8004
8050
  diagnostics.push(...extendedTemplateChecker.getDiagnosticsForComponent(component));
8005
8051
  }
8006
8052
  } catch (err) {
@@ -8295,23 +8341,29 @@ var NgCompiler = class {
8295
8341
  }
8296
8342
  return this.nonTemplateDiagnostics;
8297
8343
  }
8298
- getExtendedTemplateDiagnostics(sf) {
8344
+ runAdditionalChecks(sf) {
8299
8345
  const diagnostics = [];
8300
8346
  const compilation = this.ensureAnalyzed();
8301
- const extendedTemplateChecker = compilation.extendedTemplateChecker;
8302
- if (!extendedTemplateChecker) {
8303
- return [];
8304
- }
8305
- if (sf !== void 0) {
8306
- return compilation.traitCompiler.extendedTemplateCheck(sf, extendedTemplateChecker);
8307
- }
8308
- for (const sf2 of this.inputProgram.getSourceFiles()) {
8309
- diagnostics.push(...compilation.traitCompiler.extendedTemplateCheck(sf2, extendedTemplateChecker));
8347
+ const { extendedTemplateChecker, templateSemanticsChecker } = compilation;
8348
+ const files = sf ? [sf] : this.inputProgram.getSourceFiles();
8349
+ for (const sf2 of files) {
8350
+ if (templateSemanticsChecker !== null) {
8351
+ diagnostics.push(...compilation.traitCompiler.runAdditionalChecks(sf2, (clazz, handler) => {
8352
+ var _a;
8353
+ return ((_a = handler.templateSemanticsCheck) == null ? void 0 : _a.call(handler, clazz, templateSemanticsChecker)) || null;
8354
+ }));
8355
+ }
8356
+ if (this.options.strictTemplates && extendedTemplateChecker !== null) {
8357
+ diagnostics.push(...compilation.traitCompiler.runAdditionalChecks(sf2, (clazz, handler) => {
8358
+ var _a;
8359
+ return ((_a = handler.extendedTemplateCheck) == null ? void 0 : _a.call(handler, clazz, extendedTemplateChecker)) || null;
8360
+ }));
8361
+ }
8310
8362
  }
8311
8363
  return diagnostics;
8312
8364
  }
8313
8365
  makeCompilation() {
8314
- var _a, _b, _c, _d, _e, _f;
8366
+ var _a, _b, _c, _d;
8315
8367
  const isCore = isAngularCorePackage(this.inputProgram);
8316
8368
  let compilationMode = CompilationMode.FULL;
8317
8369
  if (!isCore) {
@@ -8402,11 +8454,11 @@ var NgCompiler = class {
8402
8454
  throw new Error('JIT mode support ("supportJitMode" option) cannot be disabled when forbidOrphanComponents is set to true');
8403
8455
  }
8404
8456
  const handlers = [
8405
- new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader, depScopeReader, ngModuleScopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, this.resourceManager, this.adapter.rootDirs, this.options.preserveWhitespaces || false, this.options.i18nUseExternalIds !== false, this.options.enableI18nLegacyMessageIdFormat !== false, this.usePoisonedData, this.options.i18nNormalizeLineEndingsInICUs === true, this.moduleResolver, this.cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, this.incrementalCompilation.depGraph, injectableRegistry, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, hostDirectivesResolver, importTracker, supportTestBed, compilationMode, deferredSymbolsTracker, !!this.options.forbidOrphanComponents, this.enableBlockSyntax, (_d = this.options.useTemplatePipeline) != null ? _d : SHOULD_USE_TEMPLATE_PIPELINE, localCompilationExtraImportsTracker),
8406
- new DirectiveDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, importTracker, supportTestBed, compilationMode, (_e = this.options.useTemplatePipeline) != null ? _e : SHOULD_USE_TEMPLATE_PIPELINE, !!this.options.generateExtraImportsInLocalMode),
8457
+ new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader, depScopeReader, ngModuleScopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, this.resourceManager, this.adapter.rootDirs, this.options.preserveWhitespaces || false, this.options.i18nUseExternalIds !== false, this.options.enableI18nLegacyMessageIdFormat !== false, this.usePoisonedData, this.options.i18nNormalizeLineEndingsInICUs === true, this.moduleResolver, this.cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, this.incrementalCompilation.depGraph, injectableRegistry, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, hostDirectivesResolver, importTracker, supportTestBed, compilationMode, deferredSymbolsTracker, !!this.options.forbidOrphanComponents, this.enableBlockSyntax, localCompilationExtraImportsTracker),
8458
+ new DirectiveDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, importTracker, supportTestBed, compilationMode, !!this.options.generateExtraImportsInLocalMode),
8407
8459
  new PipeDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, injectableRegistry, isCore, this.delegatingPerfRecorder, supportTestBed, compilationMode, !!this.options.generateExtraImportsInLocalMode),
8408
8460
  new InjectableDecoratorHandler(reflector, evaluator, isCore, strictCtorDeps, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, compilationMode),
8409
- new NgModuleDecoratorHandler(reflector, evaluator, metaReader, metaRegistry, ngModuleScopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, this.closureCompilerEnabled, (_f = this.options.onlyPublishPublicTypingsForNgModules) != null ? _f : false, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, supportJitMode, compilationMode, localCompilationExtraImportsTracker)
8461
+ new NgModuleDecoratorHandler(reflector, evaluator, metaReader, metaRegistry, ngModuleScopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, this.closureCompilerEnabled, (_d = this.options.onlyPublishPublicTypingsForNgModules) != null ? _d : false, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, supportJitMode, compilationMode, localCompilationExtraImportsTracker)
8410
8462
  ];
8411
8463
  const traitCompiler = new TraitCompiler(handlers, reflector, this.delegatingPerfRecorder, this.incrementalCompilation, this.options.compileNonExportedClasses !== false, compilationMode, dtsTransforms, semanticDepGraphUpdater, this.adapter);
8412
8464
  const notifyingDriver = new NotifyingProgramDriverWrapper(this.programDriver, (program) => {
@@ -8415,6 +8467,7 @@ var NgCompiler = class {
8415
8467
  });
8416
8468
  const templateTypeChecker = new TemplateTypeCheckerImpl(this.inputProgram, notifyingDriver, traitCompiler, this.getTypeCheckingConfig(), refEmitter, reflector, this.adapter, this.incrementalCompilation, metaReader, localMetaReader, ngModuleIndex, scopeReader, typeCheckScopeRegistry, this.delegatingPerfRecorder);
8417
8469
  const extendedTemplateChecker = this.constructionDiagnostics.length === 0 ? new ExtendedTemplateCheckerImpl(templateTypeChecker, checker, ALL_DIAGNOSTIC_FACTORIES, this.options) : null;
8470
+ const templateSemanticsChecker = this.constructionDiagnostics.length === 0 ? new TemplateSemanticsCheckerImpl(templateTypeChecker) : null;
8418
8471
  return {
8419
8472
  isCore,
8420
8473
  traitCompiler,
@@ -8429,7 +8482,8 @@ var NgCompiler = class {
8429
8482
  templateTypeChecker,
8430
8483
  resourceRegistry,
8431
8484
  extendedTemplateChecker,
8432
- localCompilationExtraImportsTracker
8485
+ localCompilationExtraImportsTracker,
8486
+ templateSemanticsChecker
8433
8487
  };
8434
8488
  }
8435
8489
  };
@@ -8439,18 +8493,18 @@ function isAngularCorePackage(program) {
8439
8493
  return false;
8440
8494
  }
8441
8495
  return r3Symbols.statements.some((stmt) => {
8442
- if (!ts37.isVariableStatement(stmt)) {
8496
+ if (!ts38.isVariableStatement(stmt)) {
8443
8497
  return false;
8444
8498
  }
8445
- const modifiers = ts37.getModifiers(stmt);
8446
- if (modifiers === void 0 || !modifiers.some((mod) => mod.kind === ts37.SyntaxKind.ExportKeyword)) {
8499
+ const modifiers = ts38.getModifiers(stmt);
8500
+ if (modifiers === void 0 || !modifiers.some((mod) => mod.kind === ts38.SyntaxKind.ExportKeyword)) {
8447
8501
  return false;
8448
8502
  }
8449
8503
  return stmt.declarationList.declarations.some((decl) => {
8450
- if (!ts37.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
8504
+ if (!ts38.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
8451
8505
  return false;
8452
8506
  }
8453
- if (decl.initializer === void 0 || decl.initializer.kind !== ts37.SyntaxKind.TrueKeyword) {
8507
+ if (decl.initializer === void 0 || decl.initializer.kind !== ts38.SyntaxKind.TrueKeyword) {
8454
8508
  return false;
8455
8509
  }
8456
8510
  return true;
@@ -8464,7 +8518,7 @@ function* verifyCompatibleTypeCheckOptions(options) {
8464
8518
  var _a, _b, _c;
8465
8519
  if (options.fullTemplateTypeCheck === false && options.strictTemplates === true) {
8466
8520
  yield makeConfigDiagnostic({
8467
- category: ts37.DiagnosticCategory.Error,
8521
+ category: ts38.DiagnosticCategory.Error,
8468
8522
  code: ErrorCode.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK,
8469
8523
  messageText: `
8470
8524
  Angular compiler option "strictTemplates" is enabled, however "fullTemplateTypeCheck" is disabled.
@@ -8483,7 +8537,7 @@ https://angular.io/guide/template-typecheck
8483
8537
  }
8484
8538
  if (options.extendedDiagnostics && options.strictTemplates === false) {
8485
8539
  yield makeConfigDiagnostic({
8486
- category: ts37.DiagnosticCategory.Error,
8540
+ category: ts38.DiagnosticCategory.Error,
8487
8541
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES,
8488
8542
  messageText: `
8489
8543
  Angular compiler option "extendedDiagnostics" is configured, however "strictTemplates" is disabled.
@@ -8500,7 +8554,7 @@ One of the following actions is required:
8500
8554
  const defaultCategory = (_a = options.extendedDiagnostics) == null ? void 0 : _a.defaultCategory;
8501
8555
  if (defaultCategory && !allowedCategoryLabels.includes(defaultCategory)) {
8502
8556
  yield makeConfigDiagnostic({
8503
- category: ts37.DiagnosticCategory.Error,
8557
+ category: ts38.DiagnosticCategory.Error,
8504
8558
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
8505
8559
  messageText: `
8506
8560
  Angular compiler option "extendedDiagnostics.defaultCategory" has an unknown diagnostic category: "${defaultCategory}".
@@ -8513,7 +8567,7 @@ ${allowedCategoryLabels.join("\n")}
8513
8567
  for (const [checkName, category] of Object.entries((_c = (_b = options.extendedDiagnostics) == null ? void 0 : _b.checks) != null ? _c : {})) {
8514
8568
  if (!SUPPORTED_DIAGNOSTIC_NAMES.has(checkName)) {
8515
8569
  yield makeConfigDiagnostic({
8516
- category: ts37.DiagnosticCategory.Error,
8570
+ category: ts38.DiagnosticCategory.Error,
8517
8571
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK,
8518
8572
  messageText: `
8519
8573
  Angular compiler option "extendedDiagnostics.checks" has an unknown check: "${checkName}".
@@ -8525,7 +8579,7 @@ ${Array.from(SUPPORTED_DIAGNOSTIC_NAMES).join("\n")}
8525
8579
  }
8526
8580
  if (!allowedCategoryLabels.includes(category)) {
8527
8581
  yield makeConfigDiagnostic({
8528
- category: ts37.DiagnosticCategory.Error,
8582
+ category: ts38.DiagnosticCategory.Error,
8529
8583
  code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
8530
8584
  messageText: `
8531
8585
  Angular compiler option "extendedDiagnostics.checks['${checkName}']" has an unknown diagnostic category: "${category}".
@@ -8555,7 +8609,7 @@ var ReferenceGraphAdapter = class {
8555
8609
  for (const { node } of references) {
8556
8610
  let sourceFile = node.getSourceFile();
8557
8611
  if (sourceFile === void 0) {
8558
- sourceFile = ts37.getOriginalNode(node).getSourceFile();
8612
+ sourceFile = ts38.getOriginalNode(node).getSourceFile();
8559
8613
  }
8560
8614
  if (sourceFile === void 0 || !isDtsPath(sourceFile.fileName)) {
8561
8615
  this.graph.add(source, node);
@@ -8594,7 +8648,7 @@ function versionMapFromProgram(program, driver) {
8594
8648
  }
8595
8649
 
8596
8650
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
8597
- import ts38 from "typescript";
8651
+ import ts39 from "typescript";
8598
8652
  var DelegatingCompilerHost2 = class {
8599
8653
  get jsDocParsingMode() {
8600
8654
  return this.delegate.jsDocParsingMode;
@@ -8679,7 +8733,7 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
8679
8733
  entryPoint = findFlatIndexEntryPoint(normalizedTsInputFiles);
8680
8734
  if (entryPoint === null) {
8681
8735
  diagnostics.push({
8682
- category: ts38.DiagnosticCategory.Error,
8736
+ category: ts39.DiagnosticCategory.Error,
8683
8737
  code: ngErrorCode(ErrorCode.CONFIG_FLAT_MODULE_NO_INDEX),
8684
8738
  file: void 0,
8685
8739
  start: void 0,
@@ -8722,10 +8776,10 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
8722
8776
  return this.fileNameToModuleName !== void 0 ? this : null;
8723
8777
  }
8724
8778
  createCachedResolveModuleNamesFunction() {
8725
- const moduleResolutionCache = ts38.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
8779
+ const moduleResolutionCache = ts39.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
8726
8780
  return (moduleNames, containingFile, reusedNames, redirectedReference, options) => {
8727
8781
  return moduleNames.map((moduleName) => {
8728
- const module = ts38.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
8782
+ const module = ts39.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
8729
8783
  return module.resolvedModule;
8730
8784
  });
8731
8785
  };
@@ -8749,7 +8803,7 @@ var NgtscProgram = class {
8749
8803
  if (reuseProgram !== void 0) {
8750
8804
  retagAllTsFiles(reuseProgram);
8751
8805
  }
8752
- this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts39.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
8806
+ this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts40.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
8753
8807
  perfRecorder.phase(PerfPhase.Unaccounted);
8754
8808
  perfRecorder.memory(PerfCheckpoint.TypeScriptProgramCreate);
8755
8809
  this.host.postProgramCreationCleanup();
@@ -8965,16 +9019,16 @@ function createProgram({ rootNames, options, host, oldProgram }) {
8965
9019
  }
8966
9020
 
8967
9021
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
8968
- import ts41 from "typescript";
9022
+ import ts42 from "typescript";
8969
9023
 
8970
9024
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
8971
- import ts40 from "typescript";
9025
+ import ts41 from "typescript";
8972
9026
  function createMessageDiagnostic(messageText) {
8973
9027
  return {
8974
9028
  file: void 0,
8975
9029
  start: void 0,
8976
9030
  length: void 0,
8977
- category: ts40.DiagnosticCategory.Message,
9031
+ category: ts41.DiagnosticCategory.Message,
8978
9032
  messageText,
8979
9033
  code: DEFAULT_ERROR_CODE,
8980
9034
  source: SOURCE
@@ -8983,13 +9037,13 @@ function createMessageDiagnostic(messageText) {
8983
9037
 
8984
9038
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
8985
9039
  var defaultFormatHost = {
8986
- getCurrentDirectory: () => ts41.sys.getCurrentDirectory(),
9040
+ getCurrentDirectory: () => ts42.sys.getCurrentDirectory(),
8987
9041
  getCanonicalFileName: (fileName) => fileName,
8988
- getNewLine: () => ts41.sys.newLine
9042
+ getNewLine: () => ts42.sys.newLine
8989
9043
  };
8990
9044
  function formatDiagnostics(diags, host = defaultFormatHost) {
8991
9045
  if (diags && diags.length) {
8992
- return diags.map((diagnostic) => replaceTsWithNgInErrors(ts41.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
9046
+ return diags.map((diagnostic) => replaceTsWithNgInErrors(ts42.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
8993
9047
  } else {
8994
9048
  return "";
8995
9049
  }
@@ -9006,7 +9060,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
9006
9060
  var _a;
9007
9061
  try {
9008
9062
  const fs = getFileSystem();
9009
- const readConfigFile = (configFile) => ts41.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
9063
+ const readConfigFile = (configFile) => ts42.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
9010
9064
  const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
9011
9065
  const { config: config2, error: error2 } = readConfigFile(configFile);
9012
9066
  if (error2) {
@@ -9041,7 +9095,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
9041
9095
  ...existingOptions
9042
9096
  };
9043
9097
  const parseConfigHost = createParseConfigHost(host, fs);
9044
- const { options, errors, fileNames: rootNames, projectReferences } = ts41.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
9098
+ const { options, errors, fileNames: rootNames, projectReferences } = ts42.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
9045
9099
  let emitFlags = EmitFlags.Default;
9046
9100
  if (!(options["skipMetadataEmit"] || options["flatModuleOutFile"])) {
9047
9101
  emitFlags |= EmitFlags.Metadata;
@@ -9052,7 +9106,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
9052
9106
  return { project: projectFile, rootNames, projectReferences, options, errors, emitFlags };
9053
9107
  } catch (e) {
9054
9108
  const errors = [{
9055
- category: ts41.DiagnosticCategory.Error,
9109
+ category: ts42.DiagnosticCategory.Error,
9056
9110
  messageText: (_a = e.stack) != null ? _a : e.message,
9057
9111
  file: void 0,
9058
9112
  start: void 0,
@@ -9066,7 +9120,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
9066
9120
  function createParseConfigHost(host, fs = getFileSystem()) {
9067
9121
  return {
9068
9122
  fileExists: host.exists.bind(host),
9069
- readDirectory: ts41.sys.readDirectory,
9123
+ readDirectory: ts42.sys.readDirectory,
9070
9124
  readFile: host.readFile.bind(host),
9071
9125
  useCaseSensitiveFileNames: fs.isCaseSensitive()
9072
9126
  };
@@ -9086,7 +9140,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
9086
9140
  }
9087
9141
  } else {
9088
9142
  const parseConfigHost = createParseConfigHost(host, fs);
9089
- const { resolvedModule } = ts41.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts41.ModuleResolutionKind.Node10, resolveJsonModule: true }, parseConfigHost);
9143
+ const { resolvedModule } = ts42.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts42.ModuleResolutionKind.Node10, resolveJsonModule: true }, parseConfigHost);
9090
9144
  if (resolvedModule) {
9091
9145
  return absoluteFrom(resolvedModule.resolvedFileName);
9092
9146
  }
@@ -9096,7 +9150,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
9096
9150
  function exitCodeFromResult(diags) {
9097
9151
  if (!diags)
9098
9152
  return 0;
9099
- if (diags.every((diag) => diag.category !== ts41.DiagnosticCategory.Error)) {
9153
+ if (diags.every((diag) => diag.category !== ts42.DiagnosticCategory.Error)) {
9100
9154
  return 0;
9101
9155
  }
9102
9156
  return diags.some((d) => d.source === "angular" && d.code === UNKNOWN_ERROR_CODE) ? 2 : 1;
@@ -9129,7 +9183,7 @@ function performCompilation({ rootNames, options, host, oldProgram, emitCallback
9129
9183
  } catch (e) {
9130
9184
  program = void 0;
9131
9185
  allDiagnostics.push({
9132
- category: ts41.DiagnosticCategory.Error,
9186
+ category: ts42.DiagnosticCategory.Error,
9133
9187
  messageText: (_a = e.stack) != null ? _a : e.message,
9134
9188
  code: UNKNOWN_ERROR_CODE,
9135
9189
  file: void 0,
@@ -9156,7 +9210,7 @@ function defaultGatherDiagnostics(program) {
9156
9210
  return allDiagnostics;
9157
9211
  }
9158
9212
  function hasErrors(diags) {
9159
- return diags.some((d) => d.category === ts41.DiagnosticCategory.Error);
9213
+ return diags.some((d) => d.category === ts42.DiagnosticCategory.Error);
9160
9214
  }
9161
9215
 
9162
9216
  export {
@@ -9201,4 +9255,4 @@ export {
9201
9255
  * Use of this source code is governed by an MIT-style license that can be
9202
9256
  * found in the LICENSE file at https://angular.io/license
9203
9257
  */
9204
- //# sourceMappingURL=chunk-FH3I22MY.js.map
9258
+ //# sourceMappingURL=chunk-SQY7XLGB.js.map