@angular/compiler-cli 17.0.0-rc.0 → 17.0.0-rc.2

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 (35) hide show
  1. package/bundles/{chunk-LPMZPYYV.js → chunk-6JN5EFEW.js} +9 -5
  2. package/bundles/{chunk-LPMZPYYV.js.map → chunk-6JN5EFEW.js.map} +1 -1
  3. package/bundles/{chunk-225M55ER.js → chunk-6WFRHXYB.js} +2 -2
  4. package/bundles/{chunk-RAK4OYZY.js → chunk-CLTYCPJK.js} +7 -2
  5. package/bundles/{chunk-RAK4OYZY.js.map → chunk-CLTYCPJK.js.map} +1 -1
  6. package/bundles/{chunk-Q5XOEMMF.js → chunk-KIPH6OCC.js} +312 -267
  7. package/bundles/chunk-KIPH6OCC.js.map +6 -0
  8. package/bundles/{chunk-YR36R26L.js → chunk-QDHJ26RK.js} +218 -148
  9. package/bundles/chunk-QDHJ26RK.js.map +6 -0
  10. package/bundles/{chunk-GTB2POO5.js → chunk-QFTMYSLL.js} +3 -3
  11. package/bundles/{chunk-7BZJ2Z2V.js → chunk-VNJI35KB.js} +2 -2
  12. package/bundles/index.js +8 -6
  13. package/bundles/index.js.map +1 -1
  14. package/bundles/linker/babel/index.js +3 -3
  15. package/bundles/linker/index.js +3 -3
  16. package/bundles/private/migrations.js +3 -3
  17. package/bundles/private/tooling.js +2 -2
  18. package/bundles/src/bin/ng_xi18n.js +5 -5
  19. package/bundles/src/bin/ngc.js +5 -5
  20. package/bundles_metadata.json +1 -1
  21. package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
  22. package/package.json +3 -3
  23. package/src/ngtsc/docs/src/decorator_extractor.d.ts +15 -0
  24. package/src/ngtsc/docs/src/entities.d.ts +13 -2
  25. package/src/ngtsc/docs/src/jsdoc_extractor.d.ts +2 -2
  26. package/src/ngtsc/metadata/src/api.d.ts +1 -1
  27. package/src/ngtsc/translator/index.d.ts +1 -0
  28. package/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive/index.d.ts +4 -1
  29. package/src/ngtsc/typecheck/src/environment.d.ts +2 -2
  30. package/bundles/chunk-Q5XOEMMF.js.map +0 -6
  31. package/bundles/chunk-YR36R26L.js.map +0 -6
  32. /package/bundles/{chunk-225M55ER.js.map → chunk-6WFRHXYB.js.map} +0 -0
  33. /package/bundles/{chunk-GTB2POO5.js.map → chunk-QFTMYSLL.js.map} +0 -0
  34. /package/bundles/{chunk-7BZJ2Z2V.js.map → chunk-VNJI35KB.js.map} +0 -0
  35. /package/src/ngtsc/{typecheck → translator}/src/type_emitter.d.ts +0 -0
@@ -36,12 +36,14 @@ import {
36
36
  aliasTransformFactory,
37
37
  declarationTransformFactory,
38
38
  ivyTransformFactory
39
- } from "./chunk-LPMZPYYV.js";
39
+ } from "./chunk-6JN5EFEW.js";
40
40
  import {
41
41
  ImportManager,
42
+ TypeEmitter,
43
+ canEmitType,
42
44
  translateExpression,
43
45
  translateType
44
- } from "./chunk-YR36R26L.js";
46
+ } from "./chunk-QDHJ26RK.js";
45
47
  import {
46
48
  AbsoluteModuleStrategy,
47
49
  AliasStrategy,
@@ -83,7 +85,7 @@ import {
83
85
  relativePathBetween,
84
86
  replaceTsWithNgInErrors,
85
87
  toUnredirectedSourceFile
86
- } from "./chunk-RAK4OYZY.js";
88
+ } from "./chunk-CLTYCPJK.js";
87
89
  import {
88
90
  ActivePerfRecorder,
89
91
  DelegatingPerfRecorder,
@@ -133,7 +135,7 @@ function createCompilerHost({ options, tsHost = ts.createCompilerHost(options, t
133
135
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/entities.mjs
134
136
  var EntryType;
135
137
  (function(EntryType2) {
136
- EntryType2["Block"] = "Block";
138
+ EntryType2["Block"] = "block";
137
139
  EntryType2["Component"] = "component";
138
140
  EntryType2["Constant"] = "constant";
139
141
  EntryType2["Decorator"] = "decorator";
@@ -155,6 +157,12 @@ var MemberType;
155
157
  MemberType2["Setter"] = "setter";
156
158
  MemberType2["EnumItem"] = "enum_item";
157
159
  })(MemberType || (MemberType = {}));
160
+ var DecoratorType;
161
+ (function(DecoratorType2) {
162
+ DecoratorType2["Class"] = "class";
163
+ DecoratorType2["Member"] = "member";
164
+ DecoratorType2["Parameter"] = "parameter";
165
+ })(DecoratorType || (DecoratorType = {}));
158
166
  var MemberTags;
159
167
  (function(MemberTags2) {
160
168
  MemberTags2["Abstract"] = "abstract";
@@ -164,6 +172,7 @@ var MemberTags;
164
172
  MemberTags2["Optional"] = "optional";
165
173
  MemberTags2["Input"] = "input";
166
174
  MemberTags2["Output"] = "output";
175
+ MemberTags2["Inherited"] = "override";
167
176
  })(MemberTags || (MemberTags = {}));
168
177
 
169
178
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
@@ -438,78 +447,82 @@ var Found = class {
438
447
  }
439
448
  };
440
449
 
450
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/extractor.mjs
451
+ import ts9 from "typescript";
452
+
453
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.mjs
454
+ import ts6 from "typescript";
455
+
456
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/filters.mjs
457
+ function isAngularPrivateName(name) {
458
+ var _a;
459
+ const firstChar = (_a = name[0]) != null ? _a : "";
460
+ return firstChar === "\u0275" || firstChar === "_";
461
+ }
462
+
463
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.mjs
464
+ import ts5 from "typescript";
465
+
466
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/generics_extractor.mjs
467
+ function extractGenerics(declaration) {
468
+ var _a, _b;
469
+ return (_b = (_a = declaration.typeParameters) == null ? void 0 : _a.map((typeParam) => {
470
+ var _a2, _b2;
471
+ return {
472
+ name: typeParam.name.getText(),
473
+ constraint: (_a2 = typeParam.constraint) == null ? void 0 : _a2.getText(),
474
+ default: (_b2 = typeParam.default) == null ? void 0 : _b2.getText()
475
+ };
476
+ })) != null ? _b : [];
477
+ }
478
+
441
479
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/jsdoc_extractor.mjs
442
480
  import ts4 from "typescript";
481
+ var decoratorExpression = /@(?=(Injectable|Component|Directive|Pipe|NgModule|Input|Output|HostBinding|HostListener|Inject|Optional|Self|Host|SkipSelf))/g;
443
482
  function extractJsDocTags(node) {
444
- return ts4.getJSDocTags(node).map((t) => {
483
+ const escapedNode = getEscapedNode(node);
484
+ return ts4.getJSDocTags(escapedNode).map((t) => {
445
485
  var _a;
446
486
  return {
447
487
  name: t.tagName.getText(),
448
- comment: (_a = ts4.getTextOfJSDocComment(t.comment)) != null ? _a : ""
488
+ comment: unescapeAngularDecorators((_a = ts4.getTextOfJSDocComment(t.comment)) != null ? _a : "")
449
489
  };
450
490
  });
451
491
  }
452
492
  function extractJsDocDescription(node) {
453
493
  var _a, _b;
454
- const commentOrTag = ts4.getJSDocCommentsAndTags(node).find((d) => {
494
+ const escapedNode = getEscapedNode(node);
495
+ const commentOrTag = ts4.getJSDocCommentsAndTags(escapedNode).find((d) => {
455
496
  return ts4.isJSDoc(d) || ts4.isJSDocParameterTag(d);
456
497
  });
457
498
  const comment = (_a = commentOrTag == null ? void 0 : commentOrTag.comment) != null ? _a : "";
458
- return typeof comment === "string" ? comment : (_b = ts4.getTextOfJSDocComment(comment)) != null ? _b : "";
499
+ const description = typeof comment === "string" ? comment : (_b = ts4.getTextOfJSDocComment(comment)) != null ? _b : "";
500
+ return unescapeAngularDecorators(description);
459
501
  }
460
502
  function extractRawJsDoc(node) {
461
503
  var _a, _b;
462
- return (_b = (_a = ts4.getJSDocCommentsAndTags(node).find(ts4.isJSDoc)) == null ? void 0 : _a.getFullText()) != null ? _b : "";
463
- }
464
-
465
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/type_extractor.mjs
466
- function extractResolvedTypeString(node, checker) {
467
- return checker.typeToString(checker.getTypeAtLocation(node));
504
+ const comment = (_b = (_a = ts4.getJSDocCommentsAndTags(node).find(ts4.isJSDoc)) == null ? void 0 : _a.getFullText()) != null ? _b : "";
505
+ return unescapeAngularDecorators(comment);
468
506
  }
469
-
470
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/enum_extractor.mjs
471
- import ts5 from "typescript";
472
- function extractEnum(declaration, typeChecker) {
473
- return {
474
- name: declaration.name.getText(),
475
- entryType: EntryType.Enum,
476
- members: extractEnumMembers(declaration, typeChecker),
477
- rawComment: extractRawJsDoc(declaration),
478
- description: extractJsDocDescription(declaration),
479
- jsdocTags: extractJsDocTags(declaration)
480
- };
507
+ function getEscapedNode(node) {
508
+ if (ts4.isParameter(node)) {
509
+ return node;
510
+ }
511
+ const rawComment = extractRawJsDoc(node);
512
+ const escaped = escapeAngularDecorators(rawComment);
513
+ const file = ts4.createSourceFile("x.ts", `${escaped}class X {}`, ts4.ScriptTarget.ES2020, true);
514
+ return file.statements.find((s) => ts4.isClassDeclaration(s));
481
515
  }
482
- function extractEnumMembers(declaration, checker) {
483
- return declaration.members.map((member) => ({
484
- name: member.name.getText(),
485
- type: extractResolvedTypeString(member, checker),
486
- value: getEnumMemberValue(member),
487
- memberType: MemberType.EnumItem,
488
- jsdocTags: extractJsDocTags(member),
489
- description: extractJsDocDescription(member),
490
- memberTags: []
491
- }));
516
+ function escapeAngularDecorators(comment) {
517
+ return comment.replace(decoratorExpression, "_NG_AT_");
492
518
  }
493
- function getEnumMemberValue(memberNode) {
494
- var _a;
495
- const literal = memberNode.getChildren().find((n) => ts5.isNumericLiteral(n) || ts5.isStringLiteral(n));
496
- return (_a = literal == null ? void 0 : literal.getText()) != null ? _a : "";
519
+ function unescapeAngularDecorators(comment) {
520
+ return comment.replace(/_NG_AT_/g, "@");
497
521
  }
498
522
 
499
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.mjs
500
- import ts6 from "typescript";
501
-
502
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/generics_extractor.mjs
503
- function extractGenerics(declaration) {
504
- var _a, _b;
505
- return (_b = (_a = declaration.typeParameters) == null ? void 0 : _a.map((typeParam) => {
506
- var _a2, _b2;
507
- return {
508
- name: typeParam.name.getText(),
509
- constraint: (_a2 = typeParam.constraint) == null ? void 0 : _a2.getText(),
510
- default: (_b2 = typeParam.default) == null ? void 0 : _b2.getText()
511
- };
512
- })) != null ? _b : [];
523
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/type_extractor.mjs
524
+ function extractResolvedTypeString(node, checker) {
525
+ return checker.typeToString(checker.getTypeAtLocation(node));
513
526
  }
514
527
 
515
528
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.mjs
@@ -551,7 +564,7 @@ var FunctionExtractor = class {
551
564
  const overloadDeclaration = (_c = symbol == null ? void 0 : symbol.declarations) == null ? void 0 : _c[i];
552
565
  if ((overloadDeclaration == null ? void 0 : overloadDeclaration.pos) === this.declaration.pos)
553
566
  continue;
554
- if (overloadDeclaration && ts6.isFunctionDeclaration(overloadDeclaration) && ((_d = overloadDeclaration.modifiers) == null ? void 0 : _d.some((mod) => mod.kind === ts6.SyntaxKind.ExportKeyword))) {
567
+ if (overloadDeclaration && ts5.isFunctionDeclaration(overloadDeclaration) && ((_d = overloadDeclaration.modifiers) == null ? void 0 : _d.some((mod) => mod.kind === ts5.SyntaxKind.ExportKeyword))) {
555
568
  overloads.push(overloadDeclaration);
556
569
  }
557
570
  }
@@ -559,26 +572,13 @@ var FunctionExtractor = class {
559
572
  return overloads;
560
573
  }
561
574
  getSymbol() {
562
- return this.typeChecker.getSymbolsInScope(this.declaration, ts6.SymbolFlags.Function).find((s) => {
575
+ return this.typeChecker.getSymbolsInScope(this.declaration, ts5.SymbolFlags.Function).find((s) => {
563
576
  var _a;
564
577
  return s.name === ((_a = this.declaration.name) == null ? void 0 : _a.getText());
565
578
  });
566
579
  }
567
580
  };
568
581
 
569
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/extractor.mjs
570
- import ts8 from "typescript";
571
-
572
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.mjs
573
- import ts7 from "typescript";
574
-
575
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/filters.mjs
576
- function isAngularPrivateName(name) {
577
- var _a;
578
- const firstChar = (_a = name[0]) != null ? _a : "";
579
- return firstChar === "\u0275" || firstChar === "_";
580
- }
581
-
582
582
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.mjs
583
583
  var ClassExtractor = class {
584
584
  constructor(declaration, typeChecker) {
@@ -589,17 +589,17 @@ var ClassExtractor = class {
589
589
  return {
590
590
  name: this.declaration.name.text,
591
591
  isAbstract: this.isAbstract(),
592
- entryType: ts7.isInterfaceDeclaration(this.declaration) ? EntryType.Interface : EntryType.UndecoratedClass,
593
- members: this.extractAllClassMembers(this.declaration),
592
+ entryType: ts6.isInterfaceDeclaration(this.declaration) ? EntryType.Interface : EntryType.UndecoratedClass,
593
+ members: this.extractAllClassMembers(),
594
594
  generics: extractGenerics(this.declaration),
595
595
  description: extractJsDocDescription(this.declaration),
596
596
  jsdocTags: extractJsDocTags(this.declaration),
597
597
  rawComment: extractRawJsDoc(this.declaration)
598
598
  };
599
599
  }
600
- extractAllClassMembers(classDeclaration) {
600
+ extractAllClassMembers() {
601
601
  const members = [];
602
- for (const member of classDeclaration.members) {
602
+ for (const member of this.getMemberDeclarations()) {
603
603
  if (this.isMemberExcluded(member))
604
604
  continue;
605
605
  const memberEntry = this.extractClassMember(member);
@@ -614,7 +614,7 @@ var ClassExtractor = class {
614
614
  return this.extractMethod(memberDeclaration);
615
615
  } else if (this.isProperty(memberDeclaration)) {
616
616
  return this.extractClassProperty(memberDeclaration);
617
- } else if (ts7.isAccessor(memberDeclaration)) {
617
+ } else if (ts6.isAccessor(memberDeclaration)) {
618
618
  return this.extractGetterSetter(memberDeclaration);
619
619
  }
620
620
  return void 0;
@@ -640,7 +640,7 @@ var ClassExtractor = class {
640
640
  extractGetterSetter(accessor) {
641
641
  return {
642
642
  ...this.extractClassProperty(accessor),
643
- memberType: ts7.isGetAccessor(accessor) ? MemberType.Getter : MemberType.Setter
643
+ memberType: ts6.isGetAccessor(accessor) ? MemberType.Getter : MemberType.Setter
644
644
  };
645
645
  }
646
646
  getMemberTags(member) {
@@ -649,8 +649,28 @@ var ClassExtractor = class {
649
649
  if (member.questionToken) {
650
650
  tags.push(MemberTags.Optional);
651
651
  }
652
+ if (member.parent !== this.declaration) {
653
+ tags.push(MemberTags.Inherited);
654
+ }
652
655
  return tags;
653
656
  }
657
+ getMemberDeclarations() {
658
+ var _a;
659
+ const type = this.typeChecker.getTypeAtLocation(this.declaration);
660
+ const members = type.getProperties();
661
+ const typeOfConstructor = this.typeChecker.getTypeOfSymbol(type.symbol);
662
+ const staticMembers = typeOfConstructor.getProperties();
663
+ const result = [];
664
+ for (const member of [...members, ...staticMembers]) {
665
+ const memberDeclarations = (_a = member.getDeclarations()) != null ? _a : [];
666
+ for (const memberDeclaration of memberDeclarations) {
667
+ if (this.isDocumentableMember(memberDeclaration)) {
668
+ result.push(memberDeclaration);
669
+ }
670
+ }
671
+ }
672
+ return result;
673
+ }
654
674
  getMemberTagsFromModifiers(mods) {
655
675
  const tags = [];
656
676
  for (const mod of mods) {
@@ -662,13 +682,13 @@ var ClassExtractor = class {
662
682
  }
663
683
  getTagForMemberModifier(mod) {
664
684
  switch (mod.kind) {
665
- case ts7.SyntaxKind.StaticKeyword:
685
+ case ts6.SyntaxKind.StaticKeyword:
666
686
  return MemberTags.Static;
667
- case ts7.SyntaxKind.ReadonlyKeyword:
687
+ case ts6.SyntaxKind.ReadonlyKeyword:
668
688
  return MemberTags.Readonly;
669
- case ts7.SyntaxKind.ProtectedKeyword:
689
+ case ts6.SyntaxKind.ProtectedKeyword:
670
690
  return MemberTags.Protected;
671
- case ts7.SyntaxKind.AbstractKeyword:
691
+ case ts6.SyntaxKind.AbstractKeyword:
672
692
  return MemberTags.Abstract;
673
693
  default:
674
694
  return void 0;
@@ -676,32 +696,27 @@ var ClassExtractor = class {
676
696
  }
677
697
  isMemberExcluded(member) {
678
698
  var _a;
679
- return !member.name || !this.isDocumentableMember(member) || !!((_a = member.modifiers) == null ? void 0 : _a.some((mod) => mod.kind === ts7.SyntaxKind.PrivateKeyword)) || isAngularPrivateName(member.name.getText());
699
+ return !member.name || !this.isDocumentableMember(member) || !!((_a = member.modifiers) == null ? void 0 : _a.some((mod) => mod.kind === ts6.SyntaxKind.PrivateKeyword)) || member.name.getText() === "prototype" || isAngularPrivateName(member.name.getText());
680
700
  }
681
701
  isDocumentableMember(member) {
682
- return this.isMethod(member) || this.isProperty(member) || ts7.isAccessor(member);
702
+ return this.isMethod(member) || this.isProperty(member) || ts6.isAccessor(member);
683
703
  }
684
704
  isProperty(member) {
685
- return ts7.isPropertyDeclaration(member) || ts7.isPropertySignature(member);
705
+ return ts6.isPropertyDeclaration(member) || ts6.isPropertySignature(member);
686
706
  }
687
707
  isMethod(member) {
688
- return ts7.isMethodDeclaration(member) || ts7.isMethodSignature(member);
708
+ return ts6.isMethodDeclaration(member) || ts6.isMethodSignature(member);
689
709
  }
690
710
  isAbstract() {
691
711
  var _a;
692
712
  const modifiers = (_a = this.declaration.modifiers) != null ? _a : [];
693
- return modifiers.some((mod) => mod.kind === ts7.SyntaxKind.AbstractKeyword);
713
+ return modifiers.some((mod) => mod.kind === ts6.SyntaxKind.AbstractKeyword);
694
714
  }
695
715
  isImplementationForOverload(method) {
696
- if (method.kind === ts7.SyntaxKind.MethodSignature)
716
+ if (method.kind === ts6.SyntaxKind.MethodSignature)
697
717
  return false;
698
- const methodsWithSameName = this.declaration.members.filter((member) => {
699
- var _a;
700
- return ((_a = member.name) == null ? void 0 : _a.getText()) === method.name.getText();
701
- }).sort((a, b) => a.pos - b.pos);
702
- if (methodsWithSameName.length === 1)
703
- return false;
704
- return method.pos === methodsWithSameName[methodsWithSameName.length - 1].pos;
718
+ const signature = this.typeChecker.getSignatureFromDeclaration(method);
719
+ return signature && this.typeChecker.isImplementationOfOverload(signature.declaration);
705
720
  }
706
721
  };
707
722
  var DirectiveExtractor = class extends ClassExtractor {
@@ -814,6 +829,108 @@ function isSyntheticAngularConstant(declaration) {
814
829
  return declaration.name.getText() === "USED_FOR_NG_TYPE_CHECKING";
815
830
  }
816
831
 
832
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/decorator_extractor.mjs
833
+ import ts7 from "typescript";
834
+ function extractorDecorator(declaration, typeChecker) {
835
+ const documentedNode = getDecoratorJsDocNode(declaration);
836
+ const decoratorType = getDecoratorType(declaration);
837
+ if (!decoratorType) {
838
+ throw new Error(`"${declaration.name.getText()} is not a decorator."`);
839
+ }
840
+ return {
841
+ name: declaration.name.getText(),
842
+ decoratorType,
843
+ entryType: EntryType.Decorator,
844
+ rawComment: extractRawJsDoc(documentedNode),
845
+ description: extractJsDocDescription(documentedNode),
846
+ jsdocTags: extractJsDocTags(documentedNode),
847
+ members: getDecoratorOptions(declaration, typeChecker)
848
+ };
849
+ }
850
+ function isDecoratorDeclaration(declaration) {
851
+ return !!getDecoratorType(declaration);
852
+ }
853
+ function isDecoratorOptionsInterface(declaration) {
854
+ return declaration.getSourceFile().statements.some((s) => ts7.isVariableStatement(s) && s.declarationList.declarations.some((d) => isDecoratorDeclaration(d) && d.name.getText() === declaration.name.getText()));
855
+ }
856
+ function getDecoratorType(declaration) {
857
+ var _a, _b;
858
+ const initializer = (_b = (_a = declaration.initializer) == null ? void 0 : _a.getFullText()) != null ? _b : "";
859
+ if (initializer.includes("makeDecorator"))
860
+ return DecoratorType.Class;
861
+ if (initializer.includes("makePropDecorator"))
862
+ return DecoratorType.Member;
863
+ if (initializer.includes("makeParamDecorator"))
864
+ return DecoratorType.Parameter;
865
+ return void 0;
866
+ }
867
+ function getDecoratorOptions(declaration, typeChecker) {
868
+ var _a, _b;
869
+ const name = declaration.name.getText();
870
+ const optionsDeclaration = declaration.getSourceFile().statements.find((node) => {
871
+ return (ts7.isInterfaceDeclaration(node) || ts7.isTypeAliasDeclaration(node)) && node.name.getText() === name;
872
+ });
873
+ if (!optionsDeclaration) {
874
+ throw new Error(`Decorator "${name}" has no corresponding options interface.`);
875
+ }
876
+ let optionsInterface;
877
+ if (ts7.isTypeAliasDeclaration(optionsDeclaration)) {
878
+ const aliasedType = typeChecker.getTypeAtLocation(optionsDeclaration.type);
879
+ optionsInterface = ((_b = (_a = aliasedType.getSymbol()) == null ? void 0 : _a.getDeclarations()) != null ? _b : []).find((d) => ts7.isInterfaceDeclaration(d));
880
+ } else {
881
+ optionsInterface = optionsDeclaration;
882
+ }
883
+ if (!optionsInterface || !ts7.isInterfaceDeclaration(optionsInterface)) {
884
+ throw new Error(`Options for decorator "${name}" is not an interface.`);
885
+ }
886
+ return extractInterface(optionsInterface, typeChecker).members;
887
+ }
888
+ function getDecoratorJsDocNode(declaration) {
889
+ const name = declaration.name.getText();
890
+ const decoratorInterface = declaration.getSourceFile().statements.find((s) => {
891
+ return ts7.isInterfaceDeclaration(s) && s.name.getText() === `${name}Decorator`;
892
+ });
893
+ if (!decoratorInterface || !ts7.isInterfaceDeclaration(decoratorInterface)) {
894
+ throw new Error(`No interface "${name}Decorator" found.`);
895
+ }
896
+ const callSignature = decoratorInterface.members.find((node) => {
897
+ return ts7.isCallSignatureDeclaration(node) && extractRawJsDoc(node);
898
+ });
899
+ if (!callSignature || !ts7.isCallSignatureDeclaration(callSignature)) {
900
+ throw new Error(`No call signature with JsDoc on "${name}Decorator"`);
901
+ }
902
+ return callSignature;
903
+ }
904
+
905
+ // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/enum_extractor.mjs
906
+ import ts8 from "typescript";
907
+ function extractEnum(declaration, typeChecker) {
908
+ return {
909
+ name: declaration.name.getText(),
910
+ entryType: EntryType.Enum,
911
+ members: extractEnumMembers(declaration, typeChecker),
912
+ rawComment: extractRawJsDoc(declaration),
913
+ description: extractJsDocDescription(declaration),
914
+ jsdocTags: extractJsDocTags(declaration)
915
+ };
916
+ }
917
+ function extractEnumMembers(declaration, checker) {
918
+ return declaration.members.map((member) => ({
919
+ name: member.name.getText(),
920
+ type: extractResolvedTypeString(member, checker),
921
+ value: getEnumMemberValue(member),
922
+ memberType: MemberType.EnumItem,
923
+ jsdocTags: extractJsDocTags(member),
924
+ description: extractJsDocDescription(member),
925
+ memberTags: []
926
+ }));
927
+ }
928
+ function getEnumMemberValue(memberNode) {
929
+ var _a;
930
+ const literal = memberNode.getChildren().find((n) => ts8.isNumericLiteral(n) || ts8.isStringLiteral(n));
931
+ return (_a = literal == null ? void 0 : literal.getText()) != null ? _a : "";
932
+ }
933
+
817
934
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/type_alias_extractor.mjs
818
935
  function extractTypeAlias(declaration) {
819
936
  return {
@@ -849,20 +966,20 @@ var DocsExtractor = class {
849
966
  if (isNamedClassDeclaration(node)) {
850
967
  return extractClass(node, this.metadataReader, this.typeChecker);
851
968
  }
852
- if (ts8.isInterfaceDeclaration(node)) {
969
+ if (ts9.isInterfaceDeclaration(node) && !isIgnoredInterface(node)) {
853
970
  return extractInterface(node, this.typeChecker);
854
971
  }
855
- if (ts8.isFunctionDeclaration(node)) {
972
+ if (ts9.isFunctionDeclaration(node)) {
856
973
  const functionExtractor = new FunctionExtractor(node, this.typeChecker);
857
974
  return functionExtractor.extract();
858
975
  }
859
- if (ts8.isVariableDeclaration(node) && !isSyntheticAngularConstant(node)) {
860
- return extractConstant(node, this.typeChecker);
976
+ if (ts9.isVariableDeclaration(node) && !isSyntheticAngularConstant(node)) {
977
+ return isDecoratorDeclaration(node) ? extractorDecorator(node, this.typeChecker) : extractConstant(node, this.typeChecker);
861
978
  }
862
- if (ts8.isTypeAliasDeclaration(node)) {
979
+ if (ts9.isTypeAliasDeclaration(node)) {
863
980
  return extractTypeAlias(node);
864
981
  }
865
- if (ts8.isEnumDeclaration(node)) {
982
+ if (ts9.isEnumDeclaration(node)) {
866
983
  return extractEnum(node, this.typeChecker);
867
984
  }
868
985
  return null;
@@ -875,7 +992,7 @@ var DocsExtractor = class {
875
992
  const declarationCount = exportedDeclarations.length;
876
993
  for (let i = 0; i < declarationCount; i++) {
877
994
  const [exportName, declaration] = exportedDeclarations[i];
878
- if (ts8.isFunctionDeclaration(declaration)) {
995
+ if (ts9.isFunctionDeclaration(declaration)) {
879
996
  const extractor = new FunctionExtractor(declaration, this.typeChecker);
880
997
  const overloads = extractor.getOverloads().map((overload) => [exportName, overload]);
881
998
  exportedDeclarations.push(...overloads);
@@ -884,9 +1001,12 @@ var DocsExtractor = class {
884
1001
  return exportedDeclarations.sort(([a, declarationA], [b, declarationB]) => declarationA.pos - declarationB.pos);
885
1002
  }
886
1003
  };
1004
+ function isIgnoredInterface(node) {
1005
+ return node.name.getText().endsWith("Decorator") || isDecoratorOptionsInterface(node);
1006
+ }
887
1007
 
888
1008
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/generator.mjs
889
- import ts9 from "typescript";
1009
+ import ts10 from "typescript";
890
1010
  var FlatIndexGenerator = class {
891
1011
  constructor(entryPoint, relativeFlatIndexPath, moduleName) {
892
1012
  this.entryPoint = entryPoint;
@@ -902,7 +1022,7 @@ var FlatIndexGenerator = class {
902
1022
 
903
1023
  export * from '${relativeEntryPoint}';
904
1024
  `;
905
- const genFile = ts9.createSourceFile(this.flatIndexPath, contents, ts9.ScriptTarget.ES2015, true, ts9.ScriptKind.TS);
1025
+ const genFile = ts10.createSourceFile(this.flatIndexPath, contents, ts10.ScriptTarget.ES2015, true, ts10.ScriptKind.TS);
906
1026
  if (this.moduleName !== null) {
907
1027
  genFile.moduleName = this.moduleName;
908
1028
  }
@@ -927,7 +1047,7 @@ function findFlatIndexEntryPoint(rootFiles) {
927
1047
  }
928
1048
 
929
1049
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/private_export_checker.mjs
930
- import ts10 from "typescript";
1050
+ import ts11 from "typescript";
931
1051
  function checkForPrivateExports(entryPoint, checker, refGraph) {
932
1052
  const diagnostics = [];
933
1053
  const topLevelExports = /* @__PURE__ */ new Set();
@@ -937,7 +1057,7 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
937
1057
  }
938
1058
  const exportedSymbols = checker.getExportsOfModule(moduleSymbol);
939
1059
  exportedSymbols.forEach((symbol) => {
940
- if (symbol.flags & ts10.SymbolFlags.Alias) {
1060
+ if (symbol.flags & ts11.SymbolFlags.Alias) {
941
1061
  symbol = checker.getAliasedSymbol(symbol);
942
1062
  }
943
1063
  const decl = symbol.valueDeclaration;
@@ -961,7 +1081,7 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
961
1081
  visibleVia = transitivePath.map((seg) => getNameOfDeclaration(seg)).join(" -> ");
962
1082
  }
963
1083
  const diagnostic = {
964
- category: ts10.DiagnosticCategory.Error,
1084
+ category: ts11.DiagnosticCategory.Error,
965
1085
  code: ngErrorCode(ErrorCode.SYMBOL_NOT_EXPORTED),
966
1086
  file: transitiveReference.getSourceFile(),
967
1087
  ...getPosOfDeclaration(transitiveReference),
@@ -981,7 +1101,7 @@ function getPosOfDeclaration(decl) {
981
1101
  };
982
1102
  }
983
1103
  function getIdentifierOfDeclaration(decl) {
984
- if ((ts10.isClassDeclaration(decl) || ts10.isVariableDeclaration(decl) || ts10.isFunctionDeclaration(decl)) && decl.name !== void 0 && ts10.isIdentifier(decl.name)) {
1104
+ if ((ts11.isClassDeclaration(decl) || ts11.isVariableDeclaration(decl) || ts11.isFunctionDeclaration(decl)) && decl.name !== void 0 && ts11.isIdentifier(decl.name)) {
985
1105
  return decl.name;
986
1106
  } else {
987
1107
  return null;
@@ -993,13 +1113,13 @@ function getNameOfDeclaration(decl) {
993
1113
  }
994
1114
  function getDescriptorOfDeclaration(decl) {
995
1115
  switch (decl.kind) {
996
- case ts10.SyntaxKind.ClassDeclaration:
1116
+ case ts11.SyntaxKind.ClassDeclaration:
997
1117
  return "class";
998
- case ts10.SyntaxKind.FunctionDeclaration:
1118
+ case ts11.SyntaxKind.FunctionDeclaration:
999
1119
  return "function";
1000
- case ts10.SyntaxKind.VariableDeclaration:
1120
+ case ts11.SyntaxKind.VariableDeclaration:
1001
1121
  return "variable";
1002
- case ts10.SyntaxKind.EnumDeclaration:
1122
+ case ts11.SyntaxKind.EnumDeclaration:
1003
1123
  return "enum";
1004
1124
  default:
1005
1125
  return "declaration";
@@ -1069,10 +1189,10 @@ var UpdateMode;
1069
1189
  })(UpdateMode || (UpdateMode = {}));
1070
1190
 
1071
1191
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
1072
- import ts12 from "typescript";
1192
+ import ts13 from "typescript";
1073
1193
 
1074
1194
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
1075
- import ts11 from "typescript";
1195
+ import ts12 from "typescript";
1076
1196
 
1077
1197
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/expando.mjs
1078
1198
  var NgExtension = Symbol("NgExtension");
@@ -1203,10 +1323,10 @@ var ShimAdapter = class {
1203
1323
  }
1204
1324
  const prefix = match[1];
1205
1325
  let baseFileName = absoluteFrom(prefix + ".ts");
1206
- let inputFile = this.delegate.getSourceFile(baseFileName, ts11.ScriptTarget.Latest);
1326
+ let inputFile = this.delegate.getSourceFile(baseFileName, ts12.ScriptTarget.Latest);
1207
1327
  if (inputFile === void 0) {
1208
1328
  baseFileName = absoluteFrom(prefix + ".tsx");
1209
- inputFile = this.delegate.getSourceFile(baseFileName, ts11.ScriptTarget.Latest);
1329
+ inputFile = this.delegate.getSourceFile(baseFileName, ts12.ScriptTarget.Latest);
1210
1330
  }
1211
1331
  if (inputFile === void 0 || isShim(inputFile)) {
1212
1332
  return void 0;
@@ -1361,7 +1481,7 @@ var TsCreateProgramDriver = class {
1361
1481
  this.sfMap.clear();
1362
1482
  }
1363
1483
  for (const [filePath, { newText, originalFile }] of contents.entries()) {
1364
- const sf = ts12.createSourceFile(filePath, newText, ts12.ScriptTarget.Latest, true);
1484
+ const sf = ts13.createSourceFile(filePath, newText, ts13.ScriptTarget.Latest, true);
1365
1485
  if (originalFile !== null) {
1366
1486
  sf[NgOriginalFile] = originalFile;
1367
1487
  }
@@ -1370,7 +1490,7 @@ var TsCreateProgramDriver = class {
1370
1490
  const host = new UpdatedProgramHost(this.sfMap, this.originalProgram, this.originalHost, this.shimExtensionPrefixes);
1371
1491
  const oldProgram = this.program;
1372
1492
  retagAllTsFiles(oldProgram);
1373
- this.program = ts12.createProgram({
1493
+ this.program = ts13.createProgram({
1374
1494
  host,
1375
1495
  rootNames: this.program.getRootFileNames(),
1376
1496
  options: this.options,
@@ -2133,7 +2253,7 @@ var NgModuleIndexImpl = class {
2133
2253
  };
2134
2254
 
2135
2255
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/resource/src/loader.mjs
2136
- import ts13 from "typescript";
2256
+ import ts14 from "typescript";
2137
2257
  var CSS_PREPROCESSOR_EXT = /(\.scss|\.sass|\.less|\.styl)$/;
2138
2258
  var RESOURCE_MARKER = ".$ngresource$";
2139
2259
  var RESOURCE_MARKER_TS = RESOURCE_MARKER + ".ts";
@@ -2243,7 +2363,7 @@ var AdapterResourceLoader = class {
2243
2363
  return this.adapter.rootDirs.map((rootDir) => join(rootDir, segment));
2244
2364
  }
2245
2365
  getResolvedCandidateLocations(url, fromFile) {
2246
- const failedLookup = ts13.resolveModuleName(url + RESOURCE_MARKER, fromFile, this.options, this.lookupResolutionHost);
2366
+ const failedLookup = ts14.resolveModuleName(url + RESOURCE_MARKER, fromFile, this.options, this.lookupResolutionHost);
2247
2367
  if (failedLookup.failedLookupLocations === void 0) {
2248
2368
  throw new Error(`Internal error: expected to find failedLookupLocations during resolution of resource '${url}' in context of ${fromFile}`);
2249
2369
  }
@@ -2360,7 +2480,7 @@ var StandaloneComponentScopeReader = class {
2360
2480
  import { CssSelector, DomElementSchemaRegistry as DomElementSchemaRegistry2, ExternalExpr as ExternalExpr2, WrappedNodeExpr } from "@angular/compiler";
2361
2481
 
2362
2482
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic.mjs
2363
- import ts14 from "typescript";
2483
+ import ts15 from "typescript";
2364
2484
  function makeTemplateDiagnostic(templateId, mapping, span, category, code, messageText, relatedMessages) {
2365
2485
  var _a;
2366
2486
  if (mapping.type === "direct") {
@@ -2369,7 +2489,7 @@ function makeTemplateDiagnostic(templateId, mapping, span, category, code, messa
2369
2489
  relatedInformation = [];
2370
2490
  for (const relatedMessage of relatedMessages) {
2371
2491
  relatedInformation.push({
2372
- category: ts14.DiagnosticCategory.Message,
2492
+ category: ts15.DiagnosticCategory.Message,
2373
2493
  code: 0,
2374
2494
  file: relatedMessage.sourceFile,
2375
2495
  start: relatedMessage.start,
@@ -2398,7 +2518,7 @@ function makeTemplateDiagnostic(templateId, mapping, span, category, code, messa
2398
2518
  if (relatedMessages !== void 0) {
2399
2519
  for (const relatedMessage of relatedMessages) {
2400
2520
  relatedInformation.push({
2401
- category: ts14.DiagnosticCategory.Message,
2521
+ category: ts15.DiagnosticCategory.Message,
2402
2522
  code: 0,
2403
2523
  file: relatedMessage.sourceFile,
2404
2524
  start: relatedMessage.start,
@@ -2428,7 +2548,7 @@ function makeTemplateDiagnostic(templateId, mapping, span, category, code, messa
2428
2548
  };
2429
2549
  }
2430
2550
  relatedInformation.push({
2431
- category: ts14.DiagnosticCategory.Message,
2551
+ category: ts15.DiagnosticCategory.Message,
2432
2552
  code: 0,
2433
2553
  file: componentSf,
2434
2554
  start: mapping.node.getStart(),
@@ -2463,7 +2583,7 @@ function parseTemplateAsSourceFile(fileName, template) {
2463
2583
  if (parseTemplateAsSourceFileForTest !== null) {
2464
2584
  return parseTemplateAsSourceFileForTest(fileName, template);
2465
2585
  }
2466
- return ts14.createSourceFile(fileName, template, ts14.ScriptTarget.Latest, false, ts14.ScriptKind.JSX);
2586
+ return ts15.createSourceFile(fileName, template, ts15.ScriptTarget.Latest, false, ts15.ScriptKind.JSX);
2467
2587
  }
2468
2588
 
2469
2589
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/id.mjs
@@ -2485,15 +2605,15 @@ function allocateTemplateId(sf) {
2485
2605
 
2486
2606
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
2487
2607
  import { EmptyExpr, ImplicitReceiver as ImplicitReceiver2, PropertyRead as PropertyRead2, PropertyWrite as PropertyWrite2, SafePropertyRead, TmplAstReference as TmplAstReference2, TmplAstTextAttribute } from "@angular/compiler";
2488
- import ts16 from "typescript";
2608
+ import ts17 from "typescript";
2489
2609
 
2490
2610
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/comments.mjs
2491
2611
  import { AbsoluteSourceSpan as AbsoluteSourceSpan2 } from "@angular/compiler";
2492
- import ts15 from "typescript";
2612
+ import ts16 from "typescript";
2493
2613
  var parseSpanComment = /^(\d+),(\d+)$/;
2494
2614
  function readSpanComment(node, sourceFile = node.getSourceFile()) {
2495
- return ts15.forEachTrailingCommentRange(sourceFile.text, node.getEnd(), (pos, end, kind) => {
2496
- if (kind !== ts15.SyntaxKind.MultiLineCommentTrivia) {
2615
+ return ts16.forEachTrailingCommentRange(sourceFile.text, node.getEnd(), (pos, end, kind) => {
2616
+ if (kind !== ts16.SyntaxKind.MultiLineCommentTrivia) {
2497
2617
  return null;
2498
2618
  }
2499
2619
  const commentText = sourceFile.text.substring(pos + 2, end - 2);
@@ -2516,25 +2636,25 @@ var ExpressionIdentifier;
2516
2636
  ExpressionIdentifier2["EVENT_PARAMETER"] = "EP";
2517
2637
  })(ExpressionIdentifier || (ExpressionIdentifier = {}));
2518
2638
  function addExpressionIdentifier(node, identifier) {
2519
- ts15.addSyntheticTrailingComment(
2639
+ ts16.addSyntheticTrailingComment(
2520
2640
  node,
2521
- ts15.SyntaxKind.MultiLineCommentTrivia,
2641
+ ts16.SyntaxKind.MultiLineCommentTrivia,
2522
2642
  `${CommentTriviaType.EXPRESSION_TYPE_IDENTIFIER}:${identifier}`,
2523
2643
  false
2524
2644
  );
2525
2645
  }
2526
2646
  var IGNORE_FOR_DIAGNOSTICS_MARKER = `${CommentTriviaType.DIAGNOSTIC}:ignore`;
2527
2647
  function markIgnoreDiagnostics(node) {
2528
- ts15.addSyntheticTrailingComment(
2648
+ ts16.addSyntheticTrailingComment(
2529
2649
  node,
2530
- ts15.SyntaxKind.MultiLineCommentTrivia,
2650
+ ts16.SyntaxKind.MultiLineCommentTrivia,
2531
2651
  IGNORE_FOR_DIAGNOSTICS_MARKER,
2532
2652
  false
2533
2653
  );
2534
2654
  }
2535
2655
  function hasIgnoreForDiagnosticsMarker(node, sourceFile) {
2536
- return ts15.forEachTrailingCommentRange(sourceFile.text, node.getEnd(), (pos, end, kind) => {
2537
- if (kind !== ts15.SyntaxKind.MultiLineCommentTrivia) {
2656
+ return ts16.forEachTrailingCommentRange(sourceFile.text, node.getEnd(), (pos, end, kind) => {
2657
+ if (kind !== ts16.SyntaxKind.MultiLineCommentTrivia) {
2538
2658
  return null;
2539
2659
  }
2540
2660
  const commentText = sourceFile.text.substring(pos + 2, end - 2);
@@ -2608,8 +2728,8 @@ function findAllMatchingNodes(tcb, opts) {
2608
2728
  return results;
2609
2729
  }
2610
2730
  function hasExpressionIdentifier(sourceFile, node, identifier) {
2611
- return ts15.forEachTrailingCommentRange(sourceFile.text, node.getEnd(), (pos, end, kind) => {
2612
- if (kind !== ts15.SyntaxKind.MultiLineCommentTrivia) {
2731
+ return ts16.forEachTrailingCommentRange(sourceFile.text, node.getEnd(), (pos, end, kind) => {
2732
+ if (kind !== ts16.SyntaxKind.MultiLineCommentTrivia) {
2613
2733
  return false;
2614
2734
  }
2615
2735
  const commentText = sourceFile.text.substring(pos + 2, end - 2);
@@ -2627,7 +2747,7 @@ var CompletionEngine = class {
2627
2747
  this.templateContextCache = /* @__PURE__ */ new Map();
2628
2748
  this.expressionCompletionCache = /* @__PURE__ */ new Map();
2629
2749
  const globalRead = findFirstMatchingNode(this.tcb, {
2630
- filter: ts16.isPropertyAccessExpression,
2750
+ filter: ts17.isPropertyAccessExpression,
2631
2751
  withExpressionIdentifier: ExpressionIdentifier.COMPONENT_COMPLETION
2632
2752
  });
2633
2753
  if (globalRead !== null) {
@@ -2651,7 +2771,7 @@ var CompletionEngine = class {
2651
2771
  let nodeContext = null;
2652
2772
  if (node instanceof EmptyExpr) {
2653
2773
  const nodeLocation = findFirstMatchingNode(this.tcb, {
2654
- filter: ts16.isIdentifier,
2774
+ filter: ts17.isIdentifier,
2655
2775
  withSpan: node.sourceSpan
2656
2776
  });
2657
2777
  if (nodeLocation !== null) {
@@ -2664,7 +2784,7 @@ var CompletionEngine = class {
2664
2784
  }
2665
2785
  if (node instanceof PropertyRead2 && node.receiver instanceof ImplicitReceiver2) {
2666
2786
  const nodeLocation = findFirstMatchingNode(this.tcb, {
2667
- filter: ts16.isPropertyAccessExpression,
2787
+ filter: ts17.isPropertyAccessExpression,
2668
2788
  withSpan: node.sourceSpan
2669
2789
  });
2670
2790
  if (nodeLocation) {
@@ -2688,21 +2808,21 @@ var CompletionEngine = class {
2688
2808
  let tsExpr = null;
2689
2809
  if (expr instanceof PropertyRead2 || expr instanceof PropertyWrite2) {
2690
2810
  tsExpr = findFirstMatchingNode(this.tcb, {
2691
- filter: ts16.isPropertyAccessExpression,
2811
+ filter: ts17.isPropertyAccessExpression,
2692
2812
  withSpan: expr.nameSpan
2693
2813
  });
2694
2814
  } else if (expr instanceof SafePropertyRead) {
2695
2815
  const ternaryExpr = findFirstMatchingNode(this.tcb, {
2696
- filter: ts16.isParenthesizedExpression,
2816
+ filter: ts17.isParenthesizedExpression,
2697
2817
  withSpan: expr.sourceSpan
2698
2818
  });
2699
- if (ternaryExpr === null || !ts16.isConditionalExpression(ternaryExpr.expression)) {
2819
+ if (ternaryExpr === null || !ts17.isConditionalExpression(ternaryExpr.expression)) {
2700
2820
  return null;
2701
2821
  }
2702
2822
  const whenTrue = ternaryExpr.expression.whenTrue;
2703
- if (ts16.isPropertyAccessExpression(whenTrue)) {
2823
+ if (ts17.isPropertyAccessExpression(whenTrue)) {
2704
2824
  tsExpr = whenTrue;
2705
- } else if (ts16.isCallExpression(whenTrue) && ts16.isPropertyAccessExpression(whenTrue.expression)) {
2825
+ } else if (ts17.isCallExpression(whenTrue) && ts17.isPropertyAccessExpression(whenTrue.expression)) {
2706
2826
  tsExpr = whenTrue.expression;
2707
2827
  }
2708
2828
  }
@@ -2724,15 +2844,15 @@ var CompletionEngine = class {
2724
2844
  let tsExpr = null;
2725
2845
  if (expr instanceof TmplAstTextAttribute) {
2726
2846
  const strNode = findFirstMatchingNode(this.tcb, {
2727
- filter: ts16.isParenthesizedExpression,
2847
+ filter: ts17.isParenthesizedExpression,
2728
2848
  withSpan: expr.sourceSpan
2729
2849
  });
2730
- if (strNode !== null && ts16.isStringLiteral(strNode.expression)) {
2850
+ if (strNode !== null && ts17.isStringLiteral(strNode.expression)) {
2731
2851
  tsExpr = strNode.expression;
2732
2852
  }
2733
2853
  } else {
2734
2854
  tsExpr = findFirstMatchingNode(this.tcb, {
2735
- filter: (n) => ts16.isStringLiteral(n) || ts16.isNumericLiteral(n),
2855
+ filter: (n) => ts17.isStringLiteral(n) || ts17.isNumericLiteral(n),
2736
2856
  withSpan: expr.sourceSpan
2737
2857
  });
2738
2858
  }
@@ -2740,7 +2860,7 @@ var CompletionEngine = class {
2740
2860
  return null;
2741
2861
  }
2742
2862
  let positionInShimFile = tsExpr.getEnd();
2743
- if (ts16.isStringLiteral(tsExpr)) {
2863
+ if (ts17.isStringLiteral(tsExpr)) {
2744
2864
  positionInShimFile -= 1;
2745
2865
  }
2746
2866
  const res = {
@@ -2779,7 +2899,7 @@ import ts30 from "typescript";
2779
2899
 
2780
2900
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/dom.mjs
2781
2901
  import { DomElementSchemaRegistry } from "@angular/compiler";
2782
- import ts17 from "typescript";
2902
+ import ts18 from "typescript";
2783
2903
  var REGISTRY = new DomElementSchemaRegistry();
2784
2904
  var REMOVE_XHTML_REGEX = /^:xhtml:/;
2785
2905
  var RegistryDomSchemaChecker = class {
@@ -2804,7 +2924,7 @@ var RegistryDomSchemaChecker = class {
2804
2924
  } else {
2805
2925
  errorMsg += `2. To allow any element add 'NO_ERRORS_SCHEMA' to the ${schemas2} of this component.`;
2806
2926
  }
2807
- const diag = makeTemplateDiagnostic(id, mapping, element.startSourceSpan, ts17.DiagnosticCategory.Error, ngErrorCode(ErrorCode.SCHEMA_INVALID_ELEMENT), errorMsg);
2927
+ const diag = makeTemplateDiagnostic(id, mapping, element.startSourceSpan, ts18.DiagnosticCategory.Error, ngErrorCode(ErrorCode.SCHEMA_INVALID_ELEMENT), errorMsg);
2808
2928
  this._diagnostics.push(diag);
2809
2929
  }
2810
2930
  }
@@ -2824,7 +2944,7 @@ var RegistryDomSchemaChecker = class {
2824
2944
  2. If '${element.name}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ${schemas2} of this component to suppress this message.
2825
2945
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the ${schemas2} of this component.`;
2826
2946
  }
2827
- const diag = makeTemplateDiagnostic(id, mapping, span, ts17.DiagnosticCategory.Error, ngErrorCode(ErrorCode.SCHEMA_INVALID_ATTRIBUTE), errorMsg);
2947
+ const diag = makeTemplateDiagnostic(id, mapping, span, ts18.DiagnosticCategory.Error, ngErrorCode(ErrorCode.SCHEMA_INVALID_ATTRIBUTE), errorMsg);
2828
2948
  this._diagnostics.push(diag);
2829
2949
  }
2830
2950
  }
@@ -2835,77 +2955,77 @@ import { ExpressionType, ExternalExpr, TypeModifier } from "@angular/compiler";
2835
2955
  import ts23 from "typescript";
2836
2956
 
2837
2957
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/ts_util.mjs
2838
- import ts18 from "typescript";
2958
+ import ts19 from "typescript";
2839
2959
  var SAFE_TO_CAST_WITHOUT_PARENS = /* @__PURE__ */ new Set([
2840
- ts18.SyntaxKind.ParenthesizedExpression,
2841
- ts18.SyntaxKind.Identifier,
2842
- ts18.SyntaxKind.CallExpression,
2843
- ts18.SyntaxKind.NonNullExpression,
2844
- ts18.SyntaxKind.ElementAccessExpression,
2845
- ts18.SyntaxKind.PropertyAccessExpression,
2846
- ts18.SyntaxKind.ArrayLiteralExpression,
2847
- ts18.SyntaxKind.ObjectLiteralExpression,
2848
- ts18.SyntaxKind.StringLiteral,
2849
- ts18.SyntaxKind.NumericLiteral,
2850
- ts18.SyntaxKind.TrueKeyword,
2851
- ts18.SyntaxKind.FalseKeyword,
2852
- ts18.SyntaxKind.NullKeyword,
2853
- ts18.SyntaxKind.UndefinedKeyword
2960
+ ts19.SyntaxKind.ParenthesizedExpression,
2961
+ ts19.SyntaxKind.Identifier,
2962
+ ts19.SyntaxKind.CallExpression,
2963
+ ts19.SyntaxKind.NonNullExpression,
2964
+ ts19.SyntaxKind.ElementAccessExpression,
2965
+ ts19.SyntaxKind.PropertyAccessExpression,
2966
+ ts19.SyntaxKind.ArrayLiteralExpression,
2967
+ ts19.SyntaxKind.ObjectLiteralExpression,
2968
+ ts19.SyntaxKind.StringLiteral,
2969
+ ts19.SyntaxKind.NumericLiteral,
2970
+ ts19.SyntaxKind.TrueKeyword,
2971
+ ts19.SyntaxKind.FalseKeyword,
2972
+ ts19.SyntaxKind.NullKeyword,
2973
+ ts19.SyntaxKind.UndefinedKeyword
2854
2974
  ]);
2855
2975
  function tsCastToAny(expr) {
2856
2976
  if (!SAFE_TO_CAST_WITHOUT_PARENS.has(expr.kind)) {
2857
- expr = ts18.factory.createParenthesizedExpression(expr);
2977
+ expr = ts19.factory.createParenthesizedExpression(expr);
2858
2978
  }
2859
- return ts18.factory.createParenthesizedExpression(ts18.factory.createAsExpression(expr, ts18.factory.createKeywordTypeNode(ts18.SyntaxKind.AnyKeyword)));
2979
+ return ts19.factory.createParenthesizedExpression(ts19.factory.createAsExpression(expr, ts19.factory.createKeywordTypeNode(ts19.SyntaxKind.AnyKeyword)));
2860
2980
  }
2861
2981
  function tsCreateElement(tagName) {
2862
- const createElement = ts18.factory.createPropertyAccessExpression(
2863
- ts18.factory.createIdentifier("document"),
2982
+ const createElement = ts19.factory.createPropertyAccessExpression(
2983
+ ts19.factory.createIdentifier("document"),
2864
2984
  "createElement"
2865
2985
  );
2866
- return ts18.factory.createCallExpression(
2986
+ return ts19.factory.createCallExpression(
2867
2987
  createElement,
2868
2988
  void 0,
2869
- [ts18.factory.createStringLiteral(tagName)]
2989
+ [ts19.factory.createStringLiteral(tagName)]
2870
2990
  );
2871
2991
  }
2872
2992
  function tsDeclareVariable(id, type) {
2873
- const decl = ts18.factory.createVariableDeclaration(
2993
+ const decl = ts19.factory.createVariableDeclaration(
2874
2994
  id,
2875
2995
  void 0,
2876
2996
  type,
2877
- ts18.factory.createNonNullExpression(ts18.factory.createNull())
2997
+ ts19.factory.createNonNullExpression(ts19.factory.createNull())
2878
2998
  );
2879
- return ts18.factory.createVariableStatement(
2999
+ return ts19.factory.createVariableStatement(
2880
3000
  void 0,
2881
3001
  [decl]
2882
3002
  );
2883
3003
  }
2884
3004
  function tsCreateTypeQueryForCoercedInput(typeName, coercedInputName) {
2885
- return ts18.factory.createTypeQueryNode(ts18.factory.createQualifiedName(typeName, `ngAcceptInputType_${coercedInputName}`));
3005
+ return ts19.factory.createTypeQueryNode(ts19.factory.createQualifiedName(typeName, `ngAcceptInputType_${coercedInputName}`));
2886
3006
  }
2887
3007
  function tsCreateVariable(id, initializer) {
2888
- const decl = ts18.factory.createVariableDeclaration(
3008
+ const decl = ts19.factory.createVariableDeclaration(
2889
3009
  id,
2890
3010
  void 0,
2891
3011
  void 0,
2892
3012
  initializer
2893
3013
  );
2894
- return ts18.factory.createVariableStatement(
3014
+ return ts19.factory.createVariableStatement(
2895
3015
  void 0,
2896
3016
  [decl]
2897
3017
  );
2898
3018
  }
2899
3019
  function tsCallMethod(receiver, methodName, args = []) {
2900
- const methodAccess = ts18.factory.createPropertyAccessExpression(receiver, methodName);
2901
- return ts18.factory.createCallExpression(
3020
+ const methodAccess = ts19.factory.createPropertyAccessExpression(receiver, methodName);
3021
+ return ts19.factory.createCallExpression(
2902
3022
  methodAccess,
2903
3023
  void 0,
2904
3024
  args
2905
3025
  );
2906
3026
  }
2907
3027
  function isAccessExpression(node) {
2908
- return ts18.isPropertyAccessExpression(node) || ts18.isElementAccessExpression(node);
3028
+ return ts19.isPropertyAccessExpression(node) || ts19.isElementAccessExpression(node);
2909
3029
  }
2910
3030
 
2911
3031
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
@@ -2916,83 +3036,6 @@ import ts21 from "typescript";
2916
3036
 
2917
3037
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
2918
3038
  import ts20 from "typescript";
2919
-
2920
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_emitter.mjs
2921
- import ts19 from "typescript";
2922
- var INELIGIBLE = {};
2923
- function canEmitType(type, canEmit) {
2924
- return canEmitTypeWorker(type);
2925
- function canEmitTypeWorker(type2) {
2926
- return visitNode(type2) !== INELIGIBLE;
2927
- }
2928
- function visitNode(node) {
2929
- if (ts19.isImportTypeNode(node)) {
2930
- return INELIGIBLE;
2931
- }
2932
- if (ts19.isTypeReferenceNode(node) && !canEmitTypeReference(node)) {
2933
- return INELIGIBLE;
2934
- } else {
2935
- return ts19.forEachChild(node, visitNode);
2936
- }
2937
- }
2938
- function canEmitTypeReference(type2) {
2939
- if (!canEmit(type2)) {
2940
- return false;
2941
- }
2942
- return type2.typeArguments === void 0 || type2.typeArguments.every(canEmitTypeWorker);
2943
- }
2944
- }
2945
- var TypeEmitter = class {
2946
- constructor(translator) {
2947
- this.translator = translator;
2948
- }
2949
- emitType(type) {
2950
- const typeReferenceTransformer = (context) => {
2951
- const visitNode = (node) => {
2952
- if (ts19.isImportTypeNode(node)) {
2953
- throw new Error("Unable to emit import type");
2954
- }
2955
- if (ts19.isTypeReferenceNode(node)) {
2956
- return this.emitTypeReference(node);
2957
- } else if (ts19.isLiteralExpression(node)) {
2958
- let clone;
2959
- if (ts19.isStringLiteral(node)) {
2960
- clone = ts19.factory.createStringLiteral(node.text);
2961
- } else if (ts19.isNumericLiteral(node)) {
2962
- clone = ts19.factory.createNumericLiteral(node.text);
2963
- } else if (ts19.isBigIntLiteral(node)) {
2964
- clone = ts19.factory.createBigIntLiteral(node.text);
2965
- } else if (ts19.isNoSubstitutionTemplateLiteral(node)) {
2966
- clone = ts19.factory.createNoSubstitutionTemplateLiteral(node.text, node.rawText);
2967
- } else if (ts19.isRegularExpressionLiteral(node)) {
2968
- clone = ts19.factory.createRegularExpressionLiteral(node.text);
2969
- } else {
2970
- throw new Error(`Unsupported literal kind ${ts19.SyntaxKind[node.kind]}`);
2971
- }
2972
- ts19.setTextRange(clone, { pos: -1, end: -1 });
2973
- return clone;
2974
- } else {
2975
- return ts19.visitEachChild(node, visitNode, context);
2976
- }
2977
- };
2978
- return (node) => ts19.visitNode(node, visitNode, ts19.isTypeNode);
2979
- };
2980
- return ts19.transform(type, [typeReferenceTransformer]).transformed[0];
2981
- }
2982
- emitTypeReference(type) {
2983
- const translatedType = this.translator(type);
2984
- if (translatedType === null) {
2985
- throw new Error("Unable to emit an unresolved reference");
2986
- }
2987
- let typeArguments = void 0;
2988
- if (type.typeArguments !== void 0) {
2989
- typeArguments = ts19.factory.createNodeArray(type.typeArguments.map((typeArg) => this.emitType(typeArg)));
2990
- }
2991
- return ts19.factory.updateTypeReferenceNode(type, translatedType.typeName, typeArguments);
2992
- }
2993
- };
2994
-
2995
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
2996
3039
  var TypeParameterEmitter = class {
2997
3040
  constructor(typeParameters, reflector) {
2998
3041
  this.typeParameters = typeParameters;
@@ -3217,7 +3260,7 @@ function constructTypeCtorParameter(node, meta, rawType) {
3217
3260
  void 0,
3218
3261
  classPropertyName,
3219
3262
  void 0,
3220
- transform == null ? tsCreateTypeQueryForCoercedInput(rawType.typeName, classPropertyName) : transform.type
3263
+ transform == null ? tsCreateTypeQueryForCoercedInput(rawType.typeName, classPropertyName) : transform.type.node
3221
3264
  ));
3222
3265
  }
3223
3266
  }
@@ -4291,7 +4334,7 @@ var TcbDirectiveInputsOp = class extends TcbOp {
4291
4334
  }
4292
4335
  if (this.dir.coercedInputFields.has(fieldName)) {
4293
4336
  let type;
4294
- if (transformType) {
4337
+ if (transformType !== null) {
4295
4338
  type = this.tcb.env.referenceTransplantedType(new TransplantedType(transformType));
4296
4339
  } else {
4297
4340
  const dirTypeRef = this.tcb.env.referenceType(this.dir.ref);
@@ -4658,8 +4701,9 @@ var TcbSwitchOp = class extends TcbOp {
4658
4701
  return false;
4659
4702
  }
4660
4703
  execute() {
4661
- const expression = tcbExpression(this.block.expression, this.tcb, this.scope);
4662
- markIgnoreDiagnostics(expression);
4704
+ const comparisonExpression = tcbExpression(this.block.expression, this.tcb, this.scope);
4705
+ markIgnoreDiagnostics(comparisonExpression);
4706
+ const expression = ts28.factory.createParenthesizedExpression(comparisonExpression);
4663
4707
  const root = this.generateCase(0, expression, null);
4664
4708
  if (root !== void 0) {
4665
4709
  this.scope.addStatement(root);
@@ -7010,10 +7054,10 @@ var factory = {
7010
7054
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive/index.mjs
7011
7055
  import { TmplAstTemplate as TmplAstTemplate4 } from "@angular/compiler";
7012
7056
  var KNOWN_CONTROL_FLOW_DIRECTIVES = /* @__PURE__ */ new Map([
7013
- ["ngIf", "NgIf"],
7014
- ["ngFor", "NgFor"],
7015
- ["ngSwitchCase", "NgSwitchCase"],
7016
- ["ngSwitchDefault", "NgSwitchDefault"]
7057
+ ["ngIf", { directive: "NgIf", builtIn: "@if" }],
7058
+ ["ngFor", { directive: "NgFor", builtIn: "@for" }],
7059
+ ["ngSwitchCase", { directive: "NgSwitchCase", builtIn: "@switch with @case" }],
7060
+ ["ngSwitchDefault", { directive: "NgSwitchDefault", builtIn: "@switch with @default" }]
7017
7061
  ]);
7018
7062
  var MissingControlFlowDirectiveCheck = class extends TemplateCheckWithVisitor {
7019
7063
  constructor() {
@@ -7038,8 +7082,8 @@ var MissingControlFlowDirectiveCheck = class extends TemplateCheckWithVisitor {
7038
7082
  return [];
7039
7083
  }
7040
7084
  const sourceSpan = controlFlowAttr.keySpan || controlFlowAttr.sourceSpan;
7041
- const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(controlFlowAttr.name);
7042
- const errorMessage = `The \`*${controlFlowAttr.name}\` directive was used in the template, but neither the \`${correspondingImport}\` directive nor the \`CommonModule\` was imported. Please make sure that either the \`${correspondingImport}\` directive or the \`CommonModule\` is included in the \`@Component.imports\` array of this component.`;
7085
+ const directiveAndBuiltIn = KNOWN_CONTROL_FLOW_DIRECTIVES.get(controlFlowAttr.name);
7086
+ const errorMessage = `The \`*${controlFlowAttr.name}\` directive was used in the template, but neither the \`${directiveAndBuiltIn == null ? void 0 : directiveAndBuiltIn.directive}\` directive nor the \`CommonModule\` was imported. Use Angular's built-in control flow ${directiveAndBuiltIn == null ? void 0 : directiveAndBuiltIn.builtIn} or make sure that either the \`${directiveAndBuiltIn == null ? void 0 : directiveAndBuiltIn.directive}\` directive or the \`CommonModule\` is included in the \`@Component.imports\` array of this component.`;
7043
7087
  const diagnostic = ctx.makeTemplateDiagnostic(sourceSpan, errorMessage);
7044
7088
  return [diagnostic];
7045
7089
  }
@@ -8642,6 +8686,7 @@ export {
8642
8686
  createCompilerHost,
8643
8687
  EntryType,
8644
8688
  MemberType,
8689
+ DecoratorType,
8645
8690
  MemberTags,
8646
8691
  untagAllTsFiles,
8647
8692
  TsCreateProgramDriver,
@@ -8667,4 +8712,4 @@ export {
8667
8712
  * Use of this source code is governed by an MIT-style license that can be
8668
8713
  * found in the LICENSE file at https://angular.io/license
8669
8714
  */
8670
- //# sourceMappingURL=chunk-Q5XOEMMF.js.map
8715
+ //# sourceMappingURL=chunk-KIPH6OCC.js.map