@angular/compiler-cli 17.1.0-next.5 → 17.1.0-rc.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 (51) hide show
  1. package/bundles/{chunk-N5SJSJNW.js → chunk-75SXFAVW.js} +24 -22
  2. package/bundles/chunk-75SXFAVW.js.map +6 -0
  3. package/bundles/{chunk-YGXKICXB.js → chunk-AJU3W7PS.js} +93 -10
  4. package/bundles/chunk-AJU3W7PS.js.map +6 -0
  5. package/bundles/{chunk-BLWWEEEL.js → chunk-FIHKBAQF.js} +2 -2
  6. package/bundles/{chunk-EFMKZSXJ.js → chunk-OQ7ITPZT.js} +817 -2
  7. package/bundles/chunk-OQ7ITPZT.js.map +6 -0
  8. package/bundles/chunk-Q5Y7HH3O.js +62 -0
  9. package/bundles/chunk-Q5Y7HH3O.js.map +6 -0
  10. package/bundles/{chunk-OZXTEOXW.js → chunk-R5FBSX7J.js} +21 -3
  11. package/bundles/chunk-R5FBSX7J.js.map +6 -0
  12. package/bundles/{chunk-U4EFDEE4.js → chunk-YS2EFQ7B.js} +94 -102
  13. package/bundles/chunk-YS2EFQ7B.js.map +6 -0
  14. package/bundles/index.js +8 -6
  15. package/bundles/index.js.map +1 -1
  16. package/bundles/linker/babel/index.js +5 -3
  17. package/bundles/linker/babel/index.js.map +1 -1
  18. package/bundles/linker/index.js +2 -3
  19. package/bundles/private/migrations.js +6 -5
  20. package/bundles/private/tooling.js +6 -2
  21. package/bundles/src/bin/ng_xi18n.js +5 -5
  22. package/bundles/src/bin/ngc.js +5 -5
  23. package/bundles_metadata.json +1 -1
  24. package/linker/babel/src/ast/babel_ast_host.d.ts +1 -0
  25. package/linker/src/ast/ast_host.d.ts +4 -0
  26. package/linker/src/ast/ast_value.d.ts +8 -1
  27. package/linker/src/ast/typescript/typescript_ast_host.d.ts +1 -0
  28. package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
  29. package/package.json +2 -2
  30. package/private/tooling.d.ts +22 -6
  31. package/src/ngtsc/annotations/directive/index.d.ts +1 -0
  32. package/src/ngtsc/annotations/directive/src/input_function.d.ts +4 -13
  33. package/src/ngtsc/annotations/directive/src/shared.d.ts +2 -2
  34. package/src/ngtsc/annotations/index.d.ts +2 -2
  35. package/src/ngtsc/diagnostics/src/error_code.d.ts +6 -0
  36. package/src/ngtsc/transform/index.d.ts +1 -0
  37. package/src/ngtsc/transform/src/utils.d.ts +1 -1
  38. package/src/ngtsc/translator/src/api/ast_factory.d.ts +1 -1
  39. package/src/ngtsc/translator/src/import_manager.d.ts +2 -1
  40. package/src/ngtsc/typecheck/src/tcb_util.d.ts +1 -1
  41. package/src/transformers/{downlevel_decorators_transform → jit_transforms}/index.d.ts +1 -0
  42. package/src/transformers/jit_transforms/signal_inputs_metadata_transform.d.ts +21 -0
  43. package/bundles/chunk-EFMKZSXJ.js.map +0 -6
  44. package/bundles/chunk-MFE4YVWE.js +0 -831
  45. package/bundles/chunk-MFE4YVWE.js.map +0 -6
  46. package/bundles/chunk-N5SJSJNW.js.map +0 -6
  47. package/bundles/chunk-OZXTEOXW.js.map +0 -6
  48. package/bundles/chunk-U4EFDEE4.js.map +0 -6
  49. package/bundles/chunk-YGXKICXB.js.map +0 -6
  50. /package/bundles/{chunk-BLWWEEEL.js.map → chunk-FIHKBAQF.js.map} +0 -0
  51. /package/src/transformers/{downlevel_decorators_transform → jit_transforms}/downlevel_decorators_transform.d.ts +0 -0
@@ -3,8 +3,14 @@
3
3
  const require = __cjsCompatRequire(import.meta.url);
4
4
 
5
5
  import {
6
- CompilationMode,
7
6
  CompletionKind,
7
+ OptimizeFor,
8
+ PotentialImportKind,
9
+ PotentialImportMode,
10
+ SymbolKind
11
+ } from "./chunk-Q5Y7HH3O.js";
12
+ import {
13
+ CompilationMode,
8
14
  ComponentDecoratorHandler,
9
15
  ComponentScopeKind,
10
16
  CompoundComponentScopeReader,
@@ -23,27 +29,16 @@ import {
23
29
  MetadataDtsModuleScopeResolver,
24
30
  NgModuleDecoratorHandler,
25
31
  NoopReferencesRegistry,
26
- OptimizeFor,
27
32
  PartialEvaluator,
28
33
  PipeDecoratorHandler,
29
- PotentialImportKind,
30
- PotentialImportMode,
31
34
  ResourceRegistry,
32
35
  SemanticDepGraphUpdater,
33
- SymbolKind,
34
36
  TraitCompiler,
35
37
  TypeCheckScopeRegistry,
36
38
  aliasTransformFactory,
37
39
  declarationTransformFactory,
38
40
  ivyTransformFactory
39
- } from "./chunk-U4EFDEE4.js";
40
- import {
41
- ImportManager,
42
- TypeEmitter,
43
- canEmitType,
44
- translateExpression,
45
- translateType
46
- } from "./chunk-MFE4YVWE.js";
41
+ } from "./chunk-YS2EFQ7B.js";
47
42
  import {
48
43
  AbsoluteModuleStrategy,
49
44
  AliasStrategy,
@@ -56,6 +51,7 @@ import {
56
51
  ExtendedTemplateDiagnosticName,
57
52
  FatalDiagnosticError,
58
53
  ImportFlags,
54
+ ImportManager,
59
55
  LocalIdentifierStrategy,
60
56
  LogicalProjectStrategy,
61
57
  ModuleResolver,
@@ -65,11 +61,13 @@ import {
65
61
  Reference,
66
62
  ReferenceEmitter,
67
63
  RelativePathStrategy,
64
+ TypeEmitter,
68
65
  TypeScriptReflectionHost,
69
66
  UnifiedModulesAliasingHost,
70
67
  UnifiedModulesStrategy,
71
68
  addDiagnosticChain,
72
69
  assertSuccessfulReferenceEmit,
70
+ canEmitType,
73
71
  getRootDirs,
74
72
  getSourceFileOrNull,
75
73
  getTokenAtPosition,
@@ -85,8 +83,10 @@ import {
85
83
  normalizeSeparators,
86
84
  relativePathBetween,
87
85
  replaceTsWithNgInErrors,
88
- toUnredirectedSourceFile
89
- } from "./chunk-EFMKZSXJ.js";
86
+ toUnredirectedSourceFile,
87
+ translateExpression,
88
+ translateType
89
+ } from "./chunk-OQ7ITPZT.js";
90
90
  import {
91
91
  ActivePerfRecorder,
92
92
  DelegatingPerfRecorder,
@@ -3313,8 +3313,8 @@ function constructTypeCtorParameter(env, meta, rawType) {
3313
3313
  const plainKeys = [];
3314
3314
  const coercedKeys = [];
3315
3315
  const signalInputKeys = [];
3316
- for (const { classPropertyName, transform, isSignal } of meta.fields.inputs) {
3317
- if (isSignal) {
3316
+ for (const { classPropertyName, transform, isSignal: isSignal2 } of meta.fields.inputs) {
3317
+ if (isSignal2) {
3318
3318
  signalInputKeys.push(ts22.factory.createLiteralTypeNode(ts22.factory.createStringLiteral(classPropertyName)));
3319
3319
  } else if (!meta.coercedInputFields.has(classPropertyName)) {
3320
3320
  plainKeys.push(ts22.factory.createLiteralTypeNode(ts22.factory.createStringLiteral(classPropertyName)));
@@ -4407,7 +4407,7 @@ var TcbDirectiveInputsOp = class extends TcbOp {
4407
4407
  for (const attr of boundAttrs) {
4408
4408
  const expr = widenBinding(translateInput(attr.attribute, this.tcb, this.scope), this.tcb);
4409
4409
  let assignment = wrapForDiagnostics(expr);
4410
- for (const { fieldName, required, transformType, isSignal } of attr.inputs) {
4410
+ for (const { fieldName, required, transformType, isSignal: isSignal2 } of attr.inputs) {
4411
4411
  let target;
4412
4412
  if (required) {
4413
4413
  seenRequiredInputs.add(fieldName);
@@ -4447,7 +4447,7 @@ var TcbDirectiveInputsOp = class extends TcbOp {
4447
4447
  }
4448
4448
  target = this.dir.stringLiteralInputFields.has(fieldName) ? ts28.factory.createElementAccessExpression(dirId, ts28.factory.createStringLiteral(fieldName)) : ts28.factory.createPropertyAccessExpression(dirId, ts28.factory.createIdentifier(fieldName));
4449
4449
  }
4450
- if (isSignal) {
4450
+ if (isSignal2) {
4451
4451
  const inputSignalBrandWriteSymbol = this.tcb.env.referenceExternalSymbol(R3Identifiers3.InputSignalBrandWriteType.moduleName, R3Identifiers3.InputSignalBrandWriteType.name);
4452
4452
  if (!ts28.isIdentifier(inputSignalBrandWriteSymbol) && !ts28.isPropertyAccessExpression(inputSignalBrandWriteSymbol)) {
4453
4453
  throw new Error(`Expected identifier or property access for reference to ${R3Identifiers3.InputSignalBrandWriteType.name}`);
@@ -7242,10 +7242,12 @@ var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
7242
7242
  return [];
7243
7243
  }
7244
7244
  };
7245
+ function isSignal(symbol) {
7246
+ return ((symbol == null ? void 0 : symbol.escapedName) === "WritableSignal" || (symbol == null ? void 0 : symbol.escapedName) === "Signal") && symbol.parent.escapedName.includes("@angular/core");
7247
+ }
7245
7248
  function buildDiagnosticForSignal(ctx, node, component) {
7246
- var _a, _b;
7247
7249
  const symbol = ctx.templateTypeChecker.getSymbolOfNode(node, component);
7248
- if ((symbol == null ? void 0 : symbol.kind) === SymbolKind.Expression && (((_a = symbol.tsType.symbol) == null ? void 0 : _a.escapedName) === "WritableSignal" || ((_b = symbol.tsType.symbol) == null ? void 0 : _b.escapedName) === "Signal") && symbol.tsType.symbol.parent.escapedName.includes("@angular/core")) {
7250
+ if ((symbol == null ? void 0 : symbol.kind) === SymbolKind.Expression && (isSignal(symbol.tsType.symbol) || isSignal(symbol.tsType.aliasSymbol))) {
7249
7251
  const templateMapping = ctx.templateTypeChecker.getTemplateMappingAtTcbLocation(symbol.tcbLocation);
7250
7252
  const errorString = `${node.name} is a function and should be invoked: ${node.name}()`;
7251
7253
  const diagnostic = ctx.makeTemplateDiagnostic(templateMapping.span, errorString);
@@ -8963,4 +8965,4 @@ export {
8963
8965
  * Use of this source code is governed by an MIT-style license that can be
8964
8966
  * found in the LICENSE file at https://angular.io/license
8965
8967
  */
8966
- //# sourceMappingURL=chunk-N5SJSJNW.js.map
8968
+ //# sourceMappingURL=chunk-75SXFAVW.js.map