@angular/compiler-cli 20.1.3 → 20.1.5

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.
@@ -16,7 +16,7 @@ import {
16
16
  tryParseSignalInputMapping,
17
17
  tryParseSignalModelMapping,
18
18
  tryParseSignalQueryFromInitializer
19
- } from "./chunk-GXMJGI7A.js";
19
+ } from "./chunk-RO5VAPEI.js";
20
20
 
21
21
  // packages/compiler-cli/src/ngtsc/transform/jit/src/downlevel_decorators_transform.js
22
22
  import ts from "typescript";
@@ -455,7 +455,7 @@ import { compileDirectiveFromMetadata, makeBindingParser, ParseLocation, ParseSo
455
455
  // packages/compiler-cli/linker/src/file_linker/partial_linkers/util.js
456
456
  import { createMayBeForwardRefExpression, outputAst as o2 } from "@angular/compiler";
457
457
  import semver from "semver";
458
- var PLACEHOLDER_VERSION = "20.1.3";
458
+ var PLACEHOLDER_VERSION = "20.1.5";
459
459
  function wrapReference(wrapped) {
460
460
  return { value: wrapped, type: wrapped };
461
461
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  import {
6
6
  angularJitApplicationTransform
7
- } from "./chunk-NA3RDKZL.js";
7
+ } from "./chunk-6SNDDF7J.js";
8
8
  import {
9
9
  AbsoluteModuleStrategy,
10
10
  ActivePerfRecorder,
@@ -92,7 +92,7 @@ import {
92
92
  toUnredirectedSourceFile,
93
93
  tryParseInitializerApi,
94
94
  untagAllTsFiles
95
- } from "./chunk-GXMJGI7A.js";
95
+ } from "./chunk-RO5VAPEI.js";
96
96
  import {
97
97
  LogicalFileSystem,
98
98
  absoluteFrom,
@@ -7553,7 +7553,7 @@ var SemanticDepGraph = class {
7553
7553
  files = /* @__PURE__ */ new Map();
7554
7554
  // Note: the explicit type annotation is used to work around a CI failure on Windows:
7555
7555
  // error TS2742: The inferred type of 'symbolByDecl' cannot be named without a reference to
7556
- // '../../../../../../../external/npm/node_modules/typescript/lib/typescript'. This is likely
7556
+ // '../../../../../../../external/angular/node_modules/typescript/lib/typescript'. This is likely
7557
7557
  // not portable. A type annotation is necessary.
7558
7558
  symbolByDecl = /* @__PURE__ */ new Map();
7559
7559
  /**
@@ -8521,17 +8521,20 @@ var TypeCheckScopeRegistry = class {
8521
8521
  * contains an error, then 'error' is returned. If the component is not declared in any NgModule,
8522
8522
  * an empty type-check scope is returned.
8523
8523
  */
8524
- getTypeCheckScope(node) {
8524
+ getTypeCheckScope(ref) {
8525
8525
  const directives = [];
8526
8526
  const pipes = /* @__PURE__ */ new Map();
8527
- const scope = this.scopeReader.getScopeForComponent(node);
8527
+ const scope = this.scopeReader.getScopeForComponent(ref.node);
8528
+ const hostMeta = this.getTypeCheckDirectiveMetadata(ref);
8529
+ const directivesOnHost = hostMeta === null ? null : this.combineWithHostDirectives(hostMeta);
8528
8530
  if (scope === null) {
8529
8531
  return {
8530
8532
  matcher: null,
8531
8533
  directives,
8532
8534
  pipes,
8533
8535
  schemas: [],
8534
- isPoisoned: false
8536
+ isPoisoned: false,
8537
+ directivesOnHost
8535
8538
  };
8536
8539
  }
8537
8540
  const isNgModuleScope = scope.kind === ComponentScopeKind.NgModule;
@@ -8570,6 +8573,7 @@ var TypeCheckScopeRegistry = class {
8570
8573
  directives,
8571
8574
  pipes,
8572
8575
  schemas: scope.schemas,
8576
+ directivesOnHost,
8573
8577
  isPoisoned: scope.kind === ComponentScopeKind.NgModule ? scope.compilation.isPoisoned || scope.exported.isPoisoned : scope.isPoisoned
8574
8578
  };
8575
8579
  this.scopeCache.set(cacheKey, typeCheckScope);
@@ -8599,10 +8603,7 @@ var TypeCheckScopeRegistry = class {
8599
8603
  continue;
8600
8604
  }
8601
8605
  const directiveMeta = this.applyExplicitlyDeferredFlag(extMeta, meta.isExplicitlyDeferred);
8602
- matcher.addSelectables(CssSelector.parse(meta.selector), [
8603
- ...this.hostDirectivesResolver.resolve(directiveMeta),
8604
- directiveMeta
8605
- ]);
8606
+ matcher.addSelectables(CssSelector.parse(meta.selector), this.combineWithHostDirectives(directiveMeta));
8606
8607
  }
8607
8608
  }
8608
8609
  return matcher;
@@ -8612,11 +8613,14 @@ var TypeCheckScopeRegistry = class {
8612
8613
  for (const [name, dep] of scope.dependencies) {
8613
8614
  const extMeta = dep.kind === MetaKind.Directive ? this.getTypeCheckDirectiveMetadata(dep.ref) : null;
8614
8615
  if (extMeta !== null) {
8615
- registry.set(name, [extMeta, ...this.hostDirectivesResolver.resolve(extMeta)]);
8616
+ registry.set(name, this.combineWithHostDirectives(extMeta));
8616
8617
  }
8617
8618
  }
8618
8619
  return new SelectorlessMatcher(registry);
8619
8620
  }
8621
+ combineWithHostDirectives(meta) {
8622
+ return [...this.hostDirectivesResolver.resolve(meta), meta];
8623
+ }
8620
8624
  };
8621
8625
 
8622
8626
  // packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.js
@@ -13502,7 +13506,7 @@ function generateTypeCheckBlock(env, ref, name, meta, domSchemaChecker, oobRecor
13502
13506
  statements.push(renderBlockStatements(env, templateScope, ts60.factory.createTrue()));
13503
13507
  }
13504
13508
  if (tcb.boundTarget.target.host !== void 0) {
13505
- const hostScope = Scope.forNodes(tcb, null, tcb.boundTarget.target.host, null, null);
13509
+ const hostScope = Scope.forNodes(tcb, null, tcb.boundTarget.target.host.node, null, null);
13506
13510
  statements.push(renderBlockStatements(env, hostScope, createHostBindingsBlockGuard()));
13507
13511
  }
13508
13512
  const body = ts60.factory.createBlock(statements);
@@ -13761,6 +13765,7 @@ var TcbDirectiveTypeOpBase = class extends TcbOp {
13761
13765
  const dirRef = this.dir.ref;
13762
13766
  const rawType = this.tcb.env.referenceType(this.dir.ref);
13763
13767
  let type;
13768
+ let span;
13764
13769
  if (this.dir.isGeneric === false || dirRef.node.typeParameters === void 0) {
13765
13770
  type = rawType;
13766
13771
  } else {
@@ -13770,9 +13775,14 @@ var TcbDirectiveTypeOpBase = class extends TcbOp {
13770
13775
  const typeArguments = dirRef.node.typeParameters.map(() => ts60.factory.createKeywordTypeNode(ts60.SyntaxKind.AnyKeyword));
13771
13776
  type = ts60.factory.createTypeReferenceNode(rawType.typeName, typeArguments);
13772
13777
  }
13778
+ if (this.node instanceof TmplAstHostElement2) {
13779
+ span = this.node.sourceSpan;
13780
+ } else {
13781
+ span = this.node.startSourceSpan || this.node.sourceSpan;
13782
+ }
13773
13783
  const id = this.tcb.allocateId();
13774
13784
  addExpressionIdentifier(id, ExpressionIdentifier.DIRECTIVE);
13775
- addParseSpanInfo(id, this.node.startSourceSpan || this.node.sourceSpan);
13785
+ addParseSpanInfo(id, span);
13776
13786
  this.scope.addStatement(tsDeclareVariable(id, type));
13777
13787
  return id;
13778
13788
  }
@@ -14240,12 +14250,16 @@ var TcbDirectiveOutputsOp = class extends TcbOp {
14240
14250
  tcb;
14241
14251
  scope;
14242
14252
  node;
14253
+ inputs;
14254
+ outputs;
14243
14255
  dir;
14244
- constructor(tcb, scope, node, dir) {
14256
+ constructor(tcb, scope, node, inputs, outputs, dir) {
14245
14257
  super();
14246
14258
  this.tcb = tcb;
14247
14259
  this.scope = scope;
14248
14260
  this.node = node;
14261
+ this.inputs = inputs;
14262
+ this.outputs = outputs;
14249
14263
  this.dir = dir;
14250
14264
  }
14251
14265
  get optional() {
@@ -14254,13 +14268,13 @@ var TcbDirectiveOutputsOp = class extends TcbOp {
14254
14268
  execute() {
14255
14269
  let dirId = null;
14256
14270
  const outputs = this.dir.outputs;
14257
- for (const output of this.node.outputs) {
14271
+ for (const output of this.outputs) {
14258
14272
  if (output.type === ParsedEventType2.LegacyAnimation || !outputs.hasBindingPropertyName(output.name)) {
14259
14273
  continue;
14260
14274
  }
14261
- if (this.tcb.env.config.checkTypeOfOutputEvents && output.name.endsWith("Change")) {
14275
+ if (this.tcb.env.config.checkTypeOfOutputEvents && this.inputs !== null && output.name.endsWith("Change")) {
14262
14276
  const inputName = output.name.slice(0, -6);
14263
- checkSplitTwoWayBinding(inputName, output, this.node.inputs, this.tcb);
14277
+ checkSplitTwoWayBinding(inputName, output, this.inputs, this.tcb);
14264
14278
  }
14265
14279
  const field = outputs.getByBindingPropertyName(output.name)[0].classPropertyName;
14266
14280
  if (dirId === null) {
@@ -14860,7 +14874,7 @@ var Scope = class _Scope {
14860
14874
  return typeof opIndexOrNode === "number" ? this.resolveOp(opIndexOrNode) : opIndexOrNode;
14861
14875
  } else if (ref instanceof TmplAstTemplate && directive === void 0 && this.templateCtxOpMap.has(ref)) {
14862
14876
  return this.resolveOp(this.templateCtxOpMap.get(ref));
14863
- } else if ((ref instanceof TmplAstElement2 || ref instanceof TmplAstTemplate || ref instanceof TmplAstComponent2 || ref instanceof TmplAstDirective2) && directive !== void 0 && this.directiveOpMap.has(ref)) {
14877
+ } else if ((ref instanceof TmplAstElement2 || ref instanceof TmplAstTemplate || ref instanceof TmplAstComponent2 || ref instanceof TmplAstDirective2 || ref instanceof TmplAstHostElement2) && directive !== void 0 && this.directiveOpMap.has(ref)) {
14864
14878
  const dirMap = this.directiveOpMap.get(ref);
14865
14879
  return dirMap.has(directive) ? this.resolveOp(dirMap.get(directive)) : null;
14866
14880
  } else if (ref instanceof TmplAstElement2 && this.elementOpMap.has(ref)) {
@@ -14915,13 +14929,13 @@ var Scope = class _Scope {
14915
14929
  this.appendContentProjectionCheckOp(node);
14916
14930
  }
14917
14931
  this.appendDirectivesAndInputsOfElementLikeNode(node);
14918
- this.appendOutputsOfElementLikeNode(node);
14932
+ this.appendOutputsOfElementLikeNode(node, node.inputs, node.outputs);
14919
14933
  this.appendSelectorlessDirectives(node);
14920
14934
  this.appendChildren(node);
14921
14935
  this.checkAndAppendReferencesOfNode(node);
14922
14936
  } else if (node instanceof TmplAstTemplate) {
14923
14937
  this.appendDirectivesAndInputsOfElementLikeNode(node);
14924
- this.appendOutputsOfElementLikeNode(node);
14938
+ this.appendOutputsOfElementLikeNode(node, node.inputs, node.outputs);
14925
14939
  this.appendSelectorlessDirectives(node);
14926
14940
  const ctxIndex = this.opQueue.push(new TcbTemplateContextOp(this.tcb, this)) - 1;
14927
14941
  this.templateCtxOpMap.set(node, ctxIndex);
@@ -14956,9 +14970,7 @@ var Scope = class _Scope {
14956
14970
  this.letDeclOpMap.set(node.name, { opIndex, node });
14957
14971
  }
14958
14972
  } else if (node instanceof TmplAstHostElement2) {
14959
- const opIndex = this.opQueue.push(new TcbHostElementOp(this.tcb, this, node)) - 1;
14960
- this.hostElementOpMap.set(node, opIndex);
14961
- this.opQueue.push(new TcbUnclaimedInputsOp(this.tcb, this, node.bindings, node, null), new TcbUnclaimedOutputsOp(this.tcb, this, node, node.listeners, null, null), new TcbDomSchemaCheckerOp(this.tcb, node, false, null));
14973
+ this.appendHostElement(node);
14962
14974
  }
14963
14975
  }
14964
14976
  appendChildren(node) {
@@ -15018,25 +15030,25 @@ var Scope = class _Scope {
15018
15030
  this.opQueue.push(new TcbDomSchemaCheckerOp(this.tcb, node, checkElement, claimedInputs));
15019
15031
  }
15020
15032
  }
15021
- appendOutputsOfElementLikeNode(node) {
15033
+ appendOutputsOfElementLikeNode(node, bindings, events) {
15022
15034
  const claimedOutputs = /* @__PURE__ */ new Set();
15023
15035
  const directives = this.tcb.boundTarget.getDirectivesOfNode(node);
15024
15036
  if (directives === null || directives.length === 0) {
15025
15037
  if (node instanceof TmplAstElement2) {
15026
- this.opQueue.push(new TcbUnclaimedOutputsOp(this.tcb, this, node, node.outputs, node.inputs, claimedOutputs));
15038
+ this.opQueue.push(new TcbUnclaimedOutputsOp(this.tcb, this, node, events, bindings, claimedOutputs));
15027
15039
  }
15028
15040
  return;
15029
15041
  }
15030
15042
  for (const dir of directives) {
15031
- this.opQueue.push(new TcbDirectiveOutputsOp(this.tcb, this, node, dir));
15043
+ this.opQueue.push(new TcbDirectiveOutputsOp(this.tcb, this, node, bindings, events, dir));
15032
15044
  }
15033
- if (node instanceof TmplAstElement2) {
15045
+ if (node instanceof TmplAstElement2 || node instanceof TmplAstHostElement2) {
15034
15046
  for (const dir of directives) {
15035
15047
  for (const outputProperty of dir.outputs.propertyNames) {
15036
15048
  claimedOutputs.add(outputProperty);
15037
15049
  }
15038
15050
  }
15039
- this.opQueue.push(new TcbUnclaimedOutputsOp(this.tcb, this, node, node.outputs, node.inputs, claimedOutputs));
15051
+ this.opQueue.push(new TcbUnclaimedOutputsOp(this.tcb, this, node, events, bindings, claimedOutputs));
15040
15052
  }
15041
15053
  }
15042
15054
  appendInputsOfSelectorlessNode(node) {
@@ -15073,7 +15085,7 @@ var Scope = class _Scope {
15073
15085
  const claimedOutputs = /* @__PURE__ */ new Set();
15074
15086
  if (directives !== null && directives.length > 0) {
15075
15087
  for (const dir of directives) {
15076
- this.opQueue.push(new TcbDirectiveOutputsOp(this.tcb, this, node, dir));
15088
+ this.opQueue.push(new TcbDirectiveOutputsOp(this.tcb, this, node, node.inputs, node.outputs, dir));
15077
15089
  for (const outputProperty of dir.outputs.propertyNames) {
15078
15090
  claimedOutputs.add(outputProperty);
15079
15091
  }
@@ -15222,6 +15234,21 @@ var Scope = class _Scope {
15222
15234
  this.validateReferenceBasedDeferredTrigger(block, triggers.viewport);
15223
15235
  }
15224
15236
  }
15237
+ appendHostElement(node) {
15238
+ const opIndex = this.opQueue.push(new TcbHostElementOp(this.tcb, this, node)) - 1;
15239
+ const directives = this.tcb.boundTarget.getDirectivesOfNode(node);
15240
+ if (directives !== null && directives.length > 0) {
15241
+ const directiveOpMap = /* @__PURE__ */ new Map();
15242
+ for (const directive of directives) {
15243
+ const directiveOp = new TcbNonGenericDirectiveTypeOp(this.tcb, this, node, directive);
15244
+ directiveOpMap.set(directive, this.opQueue.push(directiveOp) - 1);
15245
+ }
15246
+ this.directiveOpMap.set(node, directiveOpMap);
15247
+ }
15248
+ this.hostElementOpMap.set(node, opIndex);
15249
+ this.opQueue.push(new TcbUnclaimedInputsOp(this.tcb, this, node.bindings, node, null), new TcbDomSchemaCheckerOp(this.tcb, node, false, null));
15250
+ this.appendOutputsOfElementLikeNode(node, null, node.listeners);
15251
+ }
15225
15252
  validateReferenceBasedDeferredTrigger(block, trigger) {
15226
15253
  if (trigger.reference === null) {
15227
15254
  if (block.placeholder === null) {
@@ -15688,7 +15715,10 @@ var TypeCheckContextImpl = class {
15688
15715
  }
15689
15716
  const boundTarget = binder.bind({
15690
15717
  template: templateContext?.nodes,
15691
- host: hostBindingContext?.node
15718
+ host: hostBindingContext === null ? void 0 : {
15719
+ node: hostBindingContext.node,
15720
+ directives: hostBindingContext.directives
15721
+ }
15692
15722
  });
15693
15723
  if (this.inlining === InliningMode.InlineOps) {
15694
15724
  for (const dir of boundTarget.getUsedDirectives()) {
@@ -17916,18 +17946,20 @@ var DirectiveDecoratorHandler = class {
17916
17946
  if (!ts65.isClassDeclaration(node) || meta.isPoisoned && !this.usePoisonedData) {
17917
17947
  return;
17918
17948
  }
17919
- const scope = this.typeCheckScopeRegistry.getTypeCheckScope(node);
17949
+ const ref = new Reference(node);
17950
+ const scope = this.typeCheckScopeRegistry.getTypeCheckScope(ref);
17920
17951
  if (scope.isPoisoned && !this.usePoisonedData) {
17921
17952
  return;
17922
17953
  }
17923
17954
  const hostElement = createHostElement("directive", meta.meta.selector, node, meta.hostBindingNodes.literal, meta.hostBindingNodes.bindingDecorators, meta.hostBindingNodes.listenerDecorators);
17924
- if (hostElement !== null) {
17955
+ if (hostElement !== null && scope.directivesOnHost !== null) {
17925
17956
  const binder = new R3TargetBinder(scope.matcher);
17926
17957
  const hostBindingsContext = {
17927
17958
  node: hostElement,
17959
+ directives: scope.directivesOnHost,
17928
17960
  sourceMapping: { type: "direct", node }
17929
17961
  };
17930
- ctx.addDirective(new Reference(node), binder, scope.schemas, null, hostBindingsContext, meta.meta.isStandalone);
17962
+ ctx.addDirective(ref, binder, scope.schemas, null, hostBindingsContext, meta.meta.isStandalone);
17931
17963
  }
17932
17964
  }
17933
17965
  resolve(node, analysis, symbol) {
@@ -20235,7 +20267,8 @@ var ComponentDecoratorHandler = class {
20235
20267
  if (!ts73.isClassDeclaration(node) || meta.isPoisoned && !this.usePoisonedData) {
20236
20268
  return;
20237
20269
  }
20238
- const scope = this.typeCheckScopeRegistry.getTypeCheckScope(node);
20270
+ const ref = new Reference(node);
20271
+ const scope = this.typeCheckScopeRegistry.getTypeCheckScope(ref);
20239
20272
  if (scope.isPoisoned && !this.usePoisonedData) {
20240
20273
  return;
20241
20274
  }
@@ -20249,11 +20282,12 @@ var ComponentDecoratorHandler = class {
20249
20282
  preserveWhitespaces: meta.meta.template.preserveWhitespaces ?? false
20250
20283
  };
20251
20284
  const hostElement = this.typeCheckHostBindings ? createHostElement("component", meta.meta.selector, node, meta.hostBindingNodes.literal, meta.hostBindingNodes.bindingDecorators, meta.hostBindingNodes.listenerDecorators) : null;
20252
- const hostBindingsContext = hostElement === null ? null : {
20285
+ const hostBindingsContext = hostElement === null || scope.directivesOnHost === null ? null : {
20253
20286
  node: hostElement,
20287
+ directives: scope.directivesOnHost,
20254
20288
  sourceMapping: { type: "direct", node }
20255
20289
  };
20256
- ctx.addDirective(new Reference(node), binder, scope.schemas, templateContext, hostBindingsContext, meta.meta.isStandalone);
20290
+ ctx.addDirective(ref, binder, scope.schemas, templateContext, hostBindingsContext, meta.meta.isStandalone);
20257
20291
  }
20258
20292
  extendedTemplateCheck(component, extendedTemplateChecker) {
20259
20293
  return extendedTemplateChecker.getDiagnosticsForComponent(component);
@@ -12,7 +12,7 @@ import {
12
12
  formatDiagnostics,
13
13
  performCompilation,
14
14
  readConfiguration
15
- } from "./chunk-WX5V4QZA.js";
15
+ } from "./chunk-JRJZMY3G.js";
16
16
 
17
17
  // packages/compiler-cli/src/main.js
18
18
  import ts2 from "typescript";
package/bundles/index.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  isTsDiagnostic,
29
29
  performCompilation,
30
30
  readConfiguration
31
- } from "./chunk-WX5V4QZA.js";
31
+ } from "./chunk-JRJZMY3G.js";
32
32
  import {
33
33
  ConsoleLogger,
34
34
  LogLevel
@@ -37,7 +37,7 @@ import {
37
37
  angularJitApplicationTransform,
38
38
  getDownlevelDecoratorsTransform,
39
39
  getInitializerApiJitTransform
40
- } from "./chunk-NA3RDKZL.js";
40
+ } from "./chunk-6SNDDF7J.js";
41
41
  import {
42
42
  ActivePerfRecorder,
43
43
  ErrorCode,
@@ -46,7 +46,7 @@ import {
46
46
  TsCreateProgramDriver,
47
47
  isLocalCompilationDiagnostics,
48
48
  ngErrorCode
49
- } from "./chunk-GXMJGI7A.js";
49
+ } from "./chunk-RO5VAPEI.js";
50
50
  import "./chunk-I2BHWRAU.js";
51
51
  import {
52
52
  InvalidFileSystem,
@@ -77,7 +77,7 @@ import "./chunk-DWRM7PIK.js";
77
77
 
78
78
  // packages/compiler-cli/src/version.js
79
79
  import { Version } from "@angular/compiler";
80
- var VERSION = new Version("20.1.3");
80
+ var VERSION = new Version("20.1.5");
81
81
 
82
82
  // packages/compiler-cli/private/tooling.js
83
83
  var GLOBAL_DEFS_FOR_TERSER = {
@@ -13,7 +13,7 @@ import {
13
13
  TypeScriptReflectionHost,
14
14
  createForwardRefResolver,
15
15
  reflectObjectLiteral
16
- } from "../chunk-GXMJGI7A.js";
16
+ } from "../chunk-RO5VAPEI.js";
17
17
  import "../chunk-I2BHWRAU.js";
18
18
  import "../chunk-GWZQLAGK.js";
19
19
  import "../chunk-SZY7NM6F.js";
@@ -4,8 +4,8 @@
4
4
 
5
5
  import {
6
6
  angularJitApplicationTransform
7
- } from "../chunk-NA3RDKZL.js";
8
- import "../chunk-GXMJGI7A.js";
7
+ } from "../chunk-6SNDDF7J.js";
8
+ import "../chunk-RO5VAPEI.js";
9
9
  import "../chunk-I2BHWRAU.js";
10
10
  import "../chunk-GWZQLAGK.js";
11
11
  import "../chunk-SZY7NM6F.js";
@@ -6,12 +6,12 @@
6
6
  import {
7
7
  main,
8
8
  readCommandLineAndConfiguration
9
- } from "../../chunk-JWGODKML.js";
9
+ } from "../../chunk-XRIKE6FE.js";
10
10
  import {
11
11
  EmitFlags
12
- } from "../../chunk-WX5V4QZA.js";
13
- import "../../chunk-NA3RDKZL.js";
14
- import "../../chunk-GXMJGI7A.js";
12
+ } from "../../chunk-JRJZMY3G.js";
13
+ import "../../chunk-6SNDDF7J.js";
14
+ import "../../chunk-RO5VAPEI.js";
15
15
  import "../../chunk-I2BHWRAU.js";
16
16
  import {
17
17
  setFileSystem
@@ -5,10 +5,10 @@
5
5
 
6
6
  import {
7
7
  main
8
- } from "../../chunk-JWGODKML.js";
9
- import "../../chunk-WX5V4QZA.js";
10
- import "../../chunk-NA3RDKZL.js";
11
- import "../../chunk-GXMJGI7A.js";
8
+ } from "../../chunk-XRIKE6FE.js";
9
+ import "../../chunk-JRJZMY3G.js";
10
+ import "../../chunk-6SNDDF7J.js";
11
+ import "../../chunk-RO5VAPEI.js";
12
12
  import "../../chunk-I2BHWRAU.js";
13
13
  import {
14
14
  setFileSystem
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { MaybeForwardRefExpression, outputAst as o, R3DeclareDependencyMetadata, R3DependencyMetadata, R3Reference } from '@angular/compiler';
9
9
  import { AstObject, AstValue } from '../../ast/ast_value';
10
- export declare const PLACEHOLDER_VERSION = "20.1.3";
10
+ export declare const PLACEHOLDER_VERSION = "20.1.5";
11
11
  export declare function wrapReference<TExpression>(wrapped: o.WrappedNodeExpr<TExpression>): R3Reference;
12
12
  /**
13
13
  * Parses the value of an enum from the AST value's symbol name.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler-cli",
3
- "version": "20.1.3",
3
+ "version": "20.1.5",
4
4
  "description": "Angular - the compiler CLI for Node.js",
5
5
  "typings": "index.d.ts",
6
6
  "bin": {
@@ -48,7 +48,7 @@
48
48
  "yargs": "^18.0.0"
49
49
  },
50
50
  "peerDependencies": {
51
- "@angular/compiler": "20.1.3",
51
+ "@angular/compiler": "20.1.5",
52
52
  "typescript": ">=5.8 <5.9"
53
53
  },
54
54
  "peerDependenciesMeta": {
@@ -36,6 +36,10 @@ export interface TypeCheckScope {
36
36
  * (contained semantic errors during its production).
37
37
  */
38
38
  isPoisoned: boolean;
39
+ /**
40
+ * Directives that have been set on the host of the scope.
41
+ */
42
+ directivesOnHost: DirectiveMeta[] | null;
39
43
  }
40
44
  /**
41
45
  * Computes scope information to be used in template type checking.
@@ -59,9 +63,10 @@ export declare class TypeCheckScopeRegistry {
59
63
  * contains an error, then 'error' is returned. If the component is not declared in any NgModule,
60
64
  * an empty type-check scope is returned.
61
65
  */
62
- getTypeCheckScope(node: ClassDeclaration): TypeCheckScope;
66
+ getTypeCheckScope(ref: Reference<ClassDeclaration>): TypeCheckScope;
63
67
  getTypeCheckDirectiveMetadata(ref: Reference<ClassDeclaration>): DirectiveMeta | null;
64
68
  private applyExplicitlyDeferredFlag;
65
69
  private getSelectorMatcher;
66
70
  private getSelectorlessMatcher;
71
+ private combineWithHostDirectives;
67
72
  }
@@ -8,7 +8,7 @@
8
8
  import { ParseError, ParseSourceFile, R3TargetBinder, SchemaMetadata, TmplAstHostElement, TmplAstNode } from '@angular/compiler';
9
9
  import ts from 'typescript';
10
10
  import { Reference } from '../../imports';
11
- import { PipeMeta } from '../../metadata';
11
+ import { DirectiveMeta, PipeMeta } from '../../metadata';
12
12
  import { ClassDeclaration } from '../../reflection';
13
13
  import { SourceMapping, TypeCheckableDirectiveMeta } from './api';
14
14
  /** Contextuable data for type checking the template of a component. */
@@ -30,6 +30,8 @@ export interface TemplateContext {
30
30
  export interface HostBindingsContext {
31
31
  /** AST node representing the host element of the directive. */
32
32
  node: TmplAstHostElement;
33
+ /** Directives present on the host element. */
34
+ directives: DirectiveMeta[];
33
35
  /** Describes the source of the host bindings. Used for mapping errors back. */
34
36
  sourceMapping: SourceMapping;
35
37
  }
@@ -5,7 +5,7 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
- import { BoundTarget, SchemaMetadata, TmplAstElement, TmplAstForLoopBlock, TmplAstIfBlockBranch, TmplAstLetDeclaration, TmplAstNode, TmplAstReference, TmplAstTemplate, TmplAstVariable, TmplAstHostElement, TmplAstComponent, TmplAstDirective } from '@angular/compiler';
8
+ import { BoundTarget, SchemaMetadata, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstElement, TmplAstForLoopBlock, TmplAstIfBlockBranch, TmplAstLetDeclaration, TmplAstNode, TmplAstReference, TmplAstTemplate, TmplAstVariable, TmplAstHostElement, TmplAstComponent, TmplAstDirective, DirectiveOwner } from '@angular/compiler';
9
9
  import ts from 'typescript';
10
10
  import { Reference } from '../../imports';
11
11
  import { PipeMeta } from '../../metadata';
@@ -111,8 +111,10 @@ export declare class TcbDirectiveOutputsOp extends TcbOp {
111
111
  private tcb;
112
112
  private scope;
113
113
  private node;
114
+ private inputs;
115
+ private outputs;
114
116
  private dir;
115
- constructor(tcb: Context, scope: Scope, node: TmplAstTemplate | TmplAstElement | TmplAstComponent | TmplAstDirective, dir: TypeCheckableDirectiveMeta);
117
+ constructor(tcb: Context, scope: Scope, node: DirectiveOwner, inputs: TmplAstBoundAttribute[] | null, outputs: TmplAstBoundEvent[], dir: TypeCheckableDirectiveMeta);
116
118
  get optional(): boolean;
117
119
  execute(): null;
118
120
  }
@@ -301,6 +303,7 @@ declare class Scope {
301
303
  private appendComponentNode;
302
304
  private appendDeferredBlock;
303
305
  private appendDeferredTriggers;
306
+ private appendHostElement;
304
307
  private validateReferenceBasedDeferredTrigger;
305
308
  /** Reports a diagnostic if there are any `@let` declarations that conflict with a node. */
306
309
  private static checkConflictingLet;