@angular/compiler-cli 14.0.0-rc.1 → 14.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.
- package/bundles/{chunk-LX5Q27EF.js → chunk-7J66ZDC5.js} +3 -3
- package/bundles/{chunk-LX5Q27EF.js.map → chunk-7J66ZDC5.js.map} +0 -0
- package/bundles/{chunk-W6KM7BUM.js → chunk-AKU7LV22.js} +6 -6
- package/bundles/{chunk-W6KM7BUM.js.map → chunk-AKU7LV22.js.map} +0 -0
- package/bundles/{chunk-WGBFSDVQ.js → chunk-BFPVXDJN.js} +7 -7
- package/bundles/{chunk-WGBFSDVQ.js.map → chunk-BFPVXDJN.js.map} +0 -0
- package/bundles/{chunk-UMY2M5GZ.js → chunk-GGBQTGO6.js} +40 -40
- package/bundles/{chunk-UMY2M5GZ.js.map → chunk-GGBQTGO6.js.map} +0 -0
- package/bundles/{chunk-R3C7RFJ4.js → chunk-HMWNYAAE.js} +2 -2
- package/bundles/{chunk-R3C7RFJ4.js.map → chunk-HMWNYAAE.js.map} +0 -0
- package/bundles/{chunk-T7MYRXIE.js → chunk-MURZUYM7.js} +7 -7
- package/bundles/{chunk-T7MYRXIE.js.map → chunk-MURZUYM7.js.map} +0 -0
- package/bundles/{chunk-R4NY3TJC.js → chunk-QK4SXRQA.js} +5 -5
- package/bundles/{chunk-R4NY3TJC.js.map → chunk-QK4SXRQA.js.map} +0 -0
- package/bundles/{chunk-UJXXCVVY.js → chunk-RV5PLZZB.js} +70 -70
- package/bundles/{chunk-UJXXCVVY.js.map → chunk-RV5PLZZB.js.map} +0 -0
- package/bundles/{chunk-JDKMNZ6O.js → chunk-SFACRVMZ.js} +26 -26
- package/bundles/{chunk-JDKMNZ6O.js.map → chunk-SFACRVMZ.js.map} +0 -0
- package/bundles/{chunk-N4EFPPNE.js → chunk-SYV2KBTF.js} +5 -5
- package/bundles/{chunk-N4EFPPNE.js.map → chunk-SYV2KBTF.js.map} +0 -0
- package/bundles/{chunk-OLGEBPBY.js → chunk-U2VFXNL7.js} +4 -4
- package/bundles/{chunk-OLGEBPBY.js.map → chunk-U2VFXNL7.js.map} +0 -0
- package/bundles/{chunk-7XY4OMWJ.js → chunk-VEAB5CR7.js} +31 -31
- package/bundles/{chunk-7XY4OMWJ.js.map → chunk-VEAB5CR7.js.map} +0 -0
- package/bundles/{chunk-TFEYVOY6.js → chunk-VLER5B3O.js} +103 -100
- package/bundles/chunk-VLER5B3O.js.map +6 -0
- package/bundles/{chunk-74SXTDBS.js → chunk-VSZPIAX6.js} +196 -157
- package/bundles/chunk-VSZPIAX6.js.map +6 -0
- package/bundles/{chunk-2IMT6JFI.js → chunk-ZJCM37WF.js} +6 -6
- package/bundles/{chunk-2IMT6JFI.js.map → chunk-ZJCM37WF.js.map} +0 -0
- package/bundles/index.js +12 -12
- package/bundles/linker/babel/index.js +16 -16
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +4 -4
- package/bundles/ngcc/index.js +12 -12
- package/bundles/ngcc/main-ngcc.js +13 -13
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +13 -13
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +4 -4
- package/bundles/private/bazel.js +1 -1
- package/bundles/private/localize.js +3 -3
- package/bundles/private/migrations.js +5 -5
- package/bundles/private/tooling.js +2 -2
- package/bundles/src/bin/ng_xi18n.js +10 -10
- package/bundles/src/bin/ngc.js +8 -8
- package/bundles_metadata.json +1 -1
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/package.json +2 -2
- package/src/ngtsc/annotations/common/src/util.d.ts +6 -0
- package/src/ngtsc/annotations/ng_module/index.d.ts +1 -0
- package/src/ngtsc/annotations/ng_module/src/handler.d.ts +0 -19
- package/src/ngtsc/annotations/ng_module/src/module_with_providers.d.ts +26 -0
- package/src/ngtsc/typecheck/api/api.d.ts +1 -0
- package/src/ngtsc/typecheck/api/context.d.ts +2 -1
- package/src/ngtsc/typecheck/src/context.d.ts +1 -1
- package/src/ngtsc/typecheck/src/dom.d.ts +4 -2
- package/src/ngtsc/typecheck/src/type_check_block.d.ts +2 -1
- package/bundles/chunk-74SXTDBS.js.map +0 -6
- package/bundles/chunk-TFEYVOY6.js.map +0 -6
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
reflectObjectLiteral,
|
|
14
14
|
reflectTypeEntityToDeclaration,
|
|
15
15
|
typeNodeToValueExpr
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZJCM37WF.js";
|
|
17
17
|
import {
|
|
18
18
|
ErrorCode,
|
|
19
19
|
FatalDiagnosticError,
|
|
@@ -33,22 +33,22 @@ import {
|
|
|
33
33
|
translateExpression,
|
|
34
34
|
translateStatement,
|
|
35
35
|
translateType
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-SFACRVMZ.js";
|
|
37
37
|
import {
|
|
38
38
|
absoluteFrom,
|
|
39
39
|
absoluteFromSourceFile,
|
|
40
40
|
relative
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-MURZUYM7.js";
|
|
42
42
|
import {
|
|
43
43
|
PerfEvent,
|
|
44
44
|
PerfPhase
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-QK4SXRQA.js";
|
|
46
46
|
import {
|
|
47
47
|
__spreadProps,
|
|
48
48
|
__spreadValues
|
|
49
49
|
} from "./chunk-GMSUYBZP.js";
|
|
50
50
|
|
|
51
|
-
// bazel-out/
|
|
51
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
|
|
52
52
|
import { ExternalExpr, ParseLocation, ParseSourceFile, ParseSourceSpan, ReadPropExpr, WrappedNodeExpr } from "@angular/compiler";
|
|
53
53
|
import ts from "typescript";
|
|
54
54
|
function valueReferenceToExpression(valueRef) {
|
|
@@ -274,8 +274,17 @@ function resolveImportedFile(moduleResolver, importedFile, expr, origin) {
|
|
|
274
274
|
}
|
|
275
275
|
return moduleResolver.resolveModule(expr.value.moduleName, origin.fileName);
|
|
276
276
|
}
|
|
277
|
+
function getOriginNodeForDiagnostics(expr, container) {
|
|
278
|
+
const nodeSf = expr.getSourceFile();
|
|
279
|
+
const exprSf = container.getSourceFile();
|
|
280
|
+
if (nodeSf === exprSf && expr.pos >= container.pos && expr.end <= container.end) {
|
|
281
|
+
return expr;
|
|
282
|
+
} else {
|
|
283
|
+
return container;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
277
286
|
|
|
278
|
-
// bazel-out/
|
|
287
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic.mjs
|
|
279
288
|
var DynamicValue = class {
|
|
280
289
|
constructor(node, reason, code) {
|
|
281
290
|
this.node = node;
|
|
@@ -365,10 +374,10 @@ var DynamicValue = class {
|
|
|
365
374
|
}
|
|
366
375
|
};
|
|
367
376
|
|
|
368
|
-
// bazel-out/
|
|
377
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
|
|
369
378
|
import ts2 from "typescript";
|
|
370
379
|
|
|
371
|
-
// bazel-out/
|
|
380
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/result.mjs
|
|
372
381
|
var ResolvedModule = class {
|
|
373
382
|
constructor(exports, evaluate) {
|
|
374
383
|
this.exports = exports;
|
|
@@ -398,7 +407,7 @@ var EnumValue = class {
|
|
|
398
407
|
var KnownFn = class {
|
|
399
408
|
};
|
|
400
409
|
|
|
401
|
-
// bazel-out/
|
|
410
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/builtin.mjs
|
|
402
411
|
var ArraySliceBuiltinFn = class extends KnownFn {
|
|
403
412
|
constructor(lhs) {
|
|
404
413
|
super();
|
|
@@ -469,7 +478,7 @@ var ObjectAssignBuiltinFn = class extends KnownFn {
|
|
|
469
478
|
}
|
|
470
479
|
};
|
|
471
480
|
|
|
472
|
-
// bazel-out/
|
|
481
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/ts_helpers.mjs
|
|
473
482
|
var AssignHelperFn = class extends ObjectAssignBuiltinFn {
|
|
474
483
|
};
|
|
475
484
|
var SpreadHelperFn = class extends KnownFn {
|
|
@@ -522,7 +531,7 @@ var ReadHelperFn = class extends KnownFn {
|
|
|
522
531
|
}
|
|
523
532
|
};
|
|
524
533
|
|
|
525
|
-
// bazel-out/
|
|
534
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/known_declaration.mjs
|
|
526
535
|
var jsGlobalObjectValue = /* @__PURE__ */ new Map([["assign", new ObjectAssignBuiltinFn()]]);
|
|
527
536
|
var assignTsHelperFn = new AssignHelperFn();
|
|
528
537
|
var spreadTsHelperFn = new SpreadHelperFn();
|
|
@@ -546,14 +555,14 @@ function resolveKnownDeclaration(decl) {
|
|
|
546
555
|
}
|
|
547
556
|
}
|
|
548
557
|
|
|
549
|
-
// bazel-out/
|
|
558
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/synthetic.mjs
|
|
550
559
|
var SyntheticValue = class {
|
|
551
560
|
constructor(value) {
|
|
552
561
|
this.value = value;
|
|
553
562
|
}
|
|
554
563
|
};
|
|
555
564
|
|
|
556
|
-
// bazel-out/
|
|
565
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
|
|
557
566
|
function literalBinaryOp(op) {
|
|
558
567
|
return { op, literal: true };
|
|
559
568
|
}
|
|
@@ -1135,7 +1144,7 @@ function owningModule(context, override = null) {
|
|
|
1135
1144
|
}
|
|
1136
1145
|
}
|
|
1137
1146
|
|
|
1138
|
-
// bazel-out/
|
|
1147
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interface.mjs
|
|
1139
1148
|
var PartialEvaluator = class {
|
|
1140
1149
|
constructor(host, checker, dependencyTracker) {
|
|
1141
1150
|
this.host = host;
|
|
@@ -1155,7 +1164,7 @@ var PartialEvaluator = class {
|
|
|
1155
1164
|
}
|
|
1156
1165
|
};
|
|
1157
1166
|
|
|
1158
|
-
// bazel-out/
|
|
1167
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics.mjs
|
|
1159
1168
|
import ts3 from "typescript";
|
|
1160
1169
|
function describeResolvedType(value, maxDepth = 1) {
|
|
1161
1170
|
var _a, _b;
|
|
@@ -1285,7 +1294,7 @@ function getContainerNode(node) {
|
|
|
1285
1294
|
return node.getSourceFile();
|
|
1286
1295
|
}
|
|
1287
1296
|
|
|
1288
|
-
// bazel-out/
|
|
1297
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
|
|
1289
1298
|
import { LiteralExpr, WrappedNodeExpr as WrappedNodeExpr2 } from "@angular/compiler";
|
|
1290
1299
|
import ts4 from "typescript";
|
|
1291
1300
|
function getConstructorDependencies(clazz, reflector, isCore) {
|
|
@@ -1429,7 +1438,7 @@ function createUnsuitableInjectionTokenError(clazz, error) {
|
|
|
1429
1438
|
return new FatalDiagnosticError(ErrorCode.PARAM_MISSING_TOKEN, param.nameNode, chain, hints);
|
|
1430
1439
|
}
|
|
1431
1440
|
|
|
1432
|
-
// bazel-out/
|
|
1441
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
|
|
1433
1442
|
import ts5 from "typescript";
|
|
1434
1443
|
function makeDuplicateDeclarationError(node, data, kind) {
|
|
1435
1444
|
const context = [];
|
|
@@ -1537,7 +1546,7 @@ function getInheritedUndecoratedCtorDiagnostic(node, baseClass, reader) {
|
|
|
1537
1546
|
return makeDiagnostic(ErrorCode.DIRECTIVE_INHERITS_UNDECORATED_CTOR, node.name, `The ${dirOrComp.toLowerCase()} ${node.name.text} inherits its constructor from ${baseClassName}, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of ${baseClassName}'s constructor. Either add a @Directive decorator to ${baseClassName}, or add an explicit constructor to ${node.name.text}.`);
|
|
1538
1547
|
}
|
|
1539
1548
|
|
|
1540
|
-
// bazel-out/
|
|
1549
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.mjs
|
|
1541
1550
|
import ts6 from "typescript";
|
|
1542
1551
|
function resolveEnumValue(evaluator, metadata, field, enumSymbolName) {
|
|
1543
1552
|
let resolved = null;
|
|
@@ -1570,7 +1579,7 @@ function resolveLiteral(decorator, literalCache) {
|
|
|
1570
1579
|
return meta;
|
|
1571
1580
|
}
|
|
1572
1581
|
|
|
1573
|
-
// bazel-out/
|
|
1582
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/factory.mjs
|
|
1574
1583
|
import { compileDeclareFactoryFunction, compileFactoryFunction } from "@angular/compiler";
|
|
1575
1584
|
function compileNgFactoryDefField(metadata) {
|
|
1576
1585
|
const res = compileFactoryFunction(metadata);
|
|
@@ -1581,7 +1590,7 @@ function compileDeclareFactory(metadata) {
|
|
|
1581
1590
|
return { name: "\u0275fac", initializer: res.expression, statements: res.statements, type: res.type };
|
|
1582
1591
|
}
|
|
1583
1592
|
|
|
1584
|
-
// bazel-out/
|
|
1593
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.mjs
|
|
1585
1594
|
import { FunctionExpr, LiteralArrayExpr, LiteralExpr as LiteralExpr2, literalMap, ReturnStatement, WrappedNodeExpr as WrappedNodeExpr3 } from "@angular/compiler";
|
|
1586
1595
|
import ts7 from "typescript";
|
|
1587
1596
|
function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec) {
|
|
@@ -1669,13 +1678,13 @@ function removeIdentifierReferences(node, name) {
|
|
|
1669
1678
|
return result.transformed[0];
|
|
1670
1679
|
}
|
|
1671
1680
|
|
|
1672
|
-
// bazel-out/
|
|
1681
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.mjs
|
|
1673
1682
|
var NoopReferencesRegistry = class {
|
|
1674
1683
|
add(source, ...references) {
|
|
1675
1684
|
}
|
|
1676
1685
|
};
|
|
1677
1686
|
|
|
1678
|
-
// bazel-out/
|
|
1687
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/schema.mjs
|
|
1679
1688
|
import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from "@angular/compiler";
|
|
1680
1689
|
function extractSchemas(rawExpr, evaluator, context) {
|
|
1681
1690
|
const schemas = [];
|
|
@@ -1705,11 +1714,11 @@ function extractSchemas(rawExpr, evaluator, context) {
|
|
|
1705
1714
|
return schemas;
|
|
1706
1715
|
}
|
|
1707
1716
|
|
|
1708
|
-
// bazel-out/
|
|
1717
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
|
|
1709
1718
|
import { compileClassMetadata as compileClassMetadata3, compileComponentFromMetadata, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareComponentFromMetadata, CssSelector as CssSelector2, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, R3TargetBinder, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher2, ViewEncapsulation, WrappedNodeExpr as WrappedNodeExpr7 } from "@angular/compiler";
|
|
1710
|
-
import
|
|
1719
|
+
import ts24 from "typescript";
|
|
1711
1720
|
|
|
1712
|
-
// bazel-out/
|
|
1721
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
|
|
1713
1722
|
import ts8 from "typescript";
|
|
1714
1723
|
var SemanticSymbol = class {
|
|
1715
1724
|
constructor(decl) {
|
|
@@ -1725,7 +1734,7 @@ function getSymbolIdentifier(decl) {
|
|
|
1725
1734
|
return decl.name.text;
|
|
1726
1735
|
}
|
|
1727
1736
|
|
|
1728
|
-
// bazel-out/
|
|
1737
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/graph.mjs
|
|
1729
1738
|
import { ExternalExpr as ExternalExpr2 } from "@angular/compiler";
|
|
1730
1739
|
var OpaqueSymbol = class extends SemanticSymbol {
|
|
1731
1740
|
isPublicApiAffected() {
|
|
@@ -1868,10 +1877,10 @@ function getImportPath(expr) {
|
|
|
1868
1877
|
}
|
|
1869
1878
|
}
|
|
1870
1879
|
|
|
1871
|
-
// bazel-out/
|
|
1880
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
|
|
1872
1881
|
import ts9 from "typescript";
|
|
1873
1882
|
|
|
1874
|
-
// bazel-out/
|
|
1883
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util.mjs
|
|
1875
1884
|
function isSymbolEqual(a, b) {
|
|
1876
1885
|
if (a.decl === b.decl) {
|
|
1877
1886
|
return true;
|
|
@@ -1921,7 +1930,7 @@ function isSetEqual(a, b, equalityTester = referenceEquality) {
|
|
|
1921
1930
|
return true;
|
|
1922
1931
|
}
|
|
1923
1932
|
|
|
1924
|
-
// bazel-out/
|
|
1933
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
|
|
1925
1934
|
function extractSemanticTypeParameters(node) {
|
|
1926
1935
|
if (!ts9.isClassDeclaration(node) || node.typeParameters === void 0) {
|
|
1927
1936
|
return null;
|
|
@@ -1941,7 +1950,7 @@ function isTypeParameterEqual(a, b) {
|
|
|
1941
1950
|
return a.hasGenericTypeBound === b.hasGenericTypeBound;
|
|
1942
1951
|
}
|
|
1943
1952
|
|
|
1944
|
-
// bazel-out/
|
|
1953
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/api.mjs
|
|
1945
1954
|
var MetaKind;
|
|
1946
1955
|
(function(MetaKind2) {
|
|
1947
1956
|
MetaKind2[MetaKind2["Directive"] = 0] = "Directive";
|
|
@@ -1949,10 +1958,10 @@ var MetaKind;
|
|
|
1949
1958
|
MetaKind2[MetaKind2["NgModule"] = 2] = "NgModule";
|
|
1950
1959
|
})(MetaKind || (MetaKind = {}));
|
|
1951
1960
|
|
|
1952
|
-
// bazel-out/
|
|
1961
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
|
|
1953
1962
|
import ts11 from "typescript";
|
|
1954
1963
|
|
|
1955
|
-
// bazel-out/
|
|
1964
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/property_mapping.mjs
|
|
1956
1965
|
var ClassPropertyMapping = class {
|
|
1957
1966
|
constructor(forwardMap) {
|
|
1958
1967
|
this.forwardMap = forwardMap;
|
|
@@ -2028,7 +2037,7 @@ function reverseMapFromForwardMap(forwardMap) {
|
|
|
2028
2037
|
return reverseMap;
|
|
2029
2038
|
}
|
|
2030
2039
|
|
|
2031
|
-
// bazel-out/
|
|
2040
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/util.mjs
|
|
2032
2041
|
import ts10 from "typescript";
|
|
2033
2042
|
function extractReferencesFromType(checker, def, bestGuessOwningModule) {
|
|
2034
2043
|
if (!ts10.isTupleTypeNode(def)) {
|
|
@@ -2208,7 +2217,7 @@ function hasInjectableFields(clazz, host) {
|
|
|
2208
2217
|
return members.some(({ isStatic, name }) => isStatic && (name === "\u0275prov" || name === "\u0275fac"));
|
|
2209
2218
|
}
|
|
2210
2219
|
|
|
2211
|
-
// bazel-out/
|
|
2220
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
|
|
2212
2221
|
var DtsMetadataReader = class {
|
|
2213
2222
|
constructor(checker, reflector) {
|
|
2214
2223
|
this.checker = checker;
|
|
@@ -2320,7 +2329,7 @@ function readBaseClass2(clazz, checker, reflector) {
|
|
|
2320
2329
|
return null;
|
|
2321
2330
|
}
|
|
2322
2331
|
|
|
2323
|
-
// bazel-out/
|
|
2332
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/inheritance.mjs
|
|
2324
2333
|
function flattenInheritedDirectiveMetadata(reader, dir) {
|
|
2325
2334
|
const topMeta = reader.getDirectiveMetadata(dir);
|
|
2326
2335
|
if (topMeta === null) {
|
|
@@ -2377,7 +2386,7 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
|
|
|
2377
2386
|
});
|
|
2378
2387
|
}
|
|
2379
2388
|
|
|
2380
|
-
// bazel-out/
|
|
2389
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
|
|
2381
2390
|
var LocalMetadataRegistry = class {
|
|
2382
2391
|
constructor() {
|
|
2383
2392
|
this.directives = /* @__PURE__ */ new Map();
|
|
@@ -2436,7 +2445,7 @@ var InjectableClassRegistry = class {
|
|
|
2436
2445
|
}
|
|
2437
2446
|
};
|
|
2438
2447
|
|
|
2439
|
-
// bazel-out/
|
|
2448
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/resource_registry.mjs
|
|
2440
2449
|
var ResourceRegistry = class {
|
|
2441
2450
|
constructor() {
|
|
2442
2451
|
this.externalTemplateToComponentsMap = /* @__PURE__ */ new Map();
|
|
@@ -2501,14 +2510,14 @@ var ResourceRegistry = class {
|
|
|
2501
2510
|
}
|
|
2502
2511
|
};
|
|
2503
2512
|
|
|
2504
|
-
// bazel-out/
|
|
2513
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/api.mjs
|
|
2505
2514
|
var ComponentScopeKind;
|
|
2506
2515
|
(function(ComponentScopeKind2) {
|
|
2507
2516
|
ComponentScopeKind2[ComponentScopeKind2["NgModule"] = 0] = "NgModule";
|
|
2508
2517
|
ComponentScopeKind2[ComponentScopeKind2["Standalone"] = 1] = "Standalone";
|
|
2509
2518
|
})(ComponentScopeKind || (ComponentScopeKind = {}));
|
|
2510
2519
|
|
|
2511
|
-
// bazel-out/
|
|
2520
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/component_scope.mjs
|
|
2512
2521
|
var CompoundComponentScopeReader = class {
|
|
2513
2522
|
constructor(readers) {
|
|
2514
2523
|
this.readers = readers;
|
|
@@ -2533,7 +2542,7 @@ var CompoundComponentScopeReader = class {
|
|
|
2533
2542
|
}
|
|
2534
2543
|
};
|
|
2535
2544
|
|
|
2536
|
-
// bazel-out/
|
|
2545
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
|
|
2537
2546
|
var MetadataDtsModuleScopeResolver = class {
|
|
2538
2547
|
constructor(dtsMetaReader, aliasingHost) {
|
|
2539
2548
|
this.dtsMetaReader = dtsMetaReader;
|
|
@@ -2608,11 +2617,11 @@ var MetadataDtsModuleScopeResolver = class {
|
|
|
2608
2617
|
}
|
|
2609
2618
|
};
|
|
2610
2619
|
|
|
2611
|
-
// bazel-out/
|
|
2620
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
|
|
2612
2621
|
import { ExternalExpr as ExternalExpr3 } from "@angular/compiler";
|
|
2613
2622
|
import ts12 from "typescript";
|
|
2614
2623
|
|
|
2615
|
-
// bazel-out/
|
|
2624
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/util.mjs
|
|
2616
2625
|
function getDiagnosticNode(ref, rawExpr) {
|
|
2617
2626
|
return rawExpr !== null ? ref.getOriginForDiagnostics(rawExpr) : ref.node.name;
|
|
2618
2627
|
}
|
|
@@ -2638,7 +2647,7 @@ function makeUnknownComponentImportDiagnostic(ref, rawExpr) {
|
|
|
2638
2647
|
return makeDiagnostic(ErrorCode.COMPONENT_UNKNOWN_IMPORT, getDiagnosticNode(ref, rawExpr), `Component imports must be standalone components, directives, pipes, or must be NgModules.`);
|
|
2639
2648
|
}
|
|
2640
2649
|
|
|
2641
|
-
// bazel-out/
|
|
2650
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
|
|
2642
2651
|
var LocalModuleScopeRegistry = class {
|
|
2643
2652
|
constructor(localReader, fullReader, dependencyScopeReader, refEmitter, aliasingHost) {
|
|
2644
2653
|
this.localReader = localReader;
|
|
@@ -2977,7 +2986,7 @@ function reexportCollision(module, refA, refB) {
|
|
|
2977
2986
|
]);
|
|
2978
2987
|
}
|
|
2979
2988
|
|
|
2980
|
-
// bazel-out/
|
|
2989
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
|
|
2981
2990
|
import { CssSelector, SelectorMatcher } from "@angular/compiler";
|
|
2982
2991
|
import ts13 from "typescript";
|
|
2983
2992
|
var TypeCheckScopeRegistry = class {
|
|
@@ -3039,7 +3048,7 @@ var TypeCheckScopeRegistry = class {
|
|
|
3039
3048
|
}
|
|
3040
3049
|
};
|
|
3041
3050
|
|
|
3042
|
-
// bazel-out/
|
|
3051
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/api.mjs
|
|
3043
3052
|
var CompilationMode;
|
|
3044
3053
|
(function(CompilationMode2) {
|
|
3045
3054
|
CompilationMode2[CompilationMode2["FULL"] = 0] = "FULL";
|
|
@@ -3057,7 +3066,7 @@ var HandlerFlags;
|
|
|
3057
3066
|
HandlerFlags2[HandlerFlags2["FULL_INHERITANCE"] = 1] = "FULL_INHERITANCE";
|
|
3058
3067
|
})(HandlerFlags || (HandlerFlags = {}));
|
|
3059
3068
|
|
|
3060
|
-
// bazel-out/
|
|
3069
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/alias.mjs
|
|
3061
3070
|
import ts14 from "typescript";
|
|
3062
3071
|
function aliasTransformFactory(exportStatements) {
|
|
3063
3072
|
return (context) => {
|
|
@@ -3075,10 +3084,10 @@ function aliasTransformFactory(exportStatements) {
|
|
|
3075
3084
|
};
|
|
3076
3085
|
}
|
|
3077
3086
|
|
|
3078
|
-
// bazel-out/
|
|
3087
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
|
|
3079
3088
|
import ts15 from "typescript";
|
|
3080
3089
|
|
|
3081
|
-
// bazel-out/
|
|
3090
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
|
|
3082
3091
|
var TraitState;
|
|
3083
3092
|
(function(TraitState2) {
|
|
3084
3093
|
TraitState2[TraitState2["Pending"] = 0] = "Pending";
|
|
@@ -3133,7 +3142,7 @@ var TraitImpl = class {
|
|
|
3133
3142
|
}
|
|
3134
3143
|
};
|
|
3135
3144
|
|
|
3136
|
-
// bazel-out/
|
|
3145
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
|
|
3137
3146
|
var TraitCompiler = class {
|
|
3138
3147
|
constructor(handlers, reflector, perf, incrementalBuild, compileNonExportedClasses, compilationMode, dtsTransforms, semanticDepGraphUpdater, sourceFileTypeIdentifier) {
|
|
3139
3148
|
this.handlers = handlers;
|
|
@@ -3577,10 +3586,10 @@ function containsErrors(diagnostics) {
|
|
|
3577
3586
|
return diagnostics !== null && diagnostics.some((diag) => diag.category === ts15.DiagnosticCategory.Error);
|
|
3578
3587
|
}
|
|
3579
3588
|
|
|
3580
|
-
// bazel-out/
|
|
3589
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
|
|
3581
3590
|
import ts17 from "typescript";
|
|
3582
3591
|
|
|
3583
|
-
// bazel-out/
|
|
3592
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/utils.mjs
|
|
3584
3593
|
import ts16 from "typescript";
|
|
3585
3594
|
function addImports(importManager, sf, extraStatements = []) {
|
|
3586
3595
|
const addedImports = importManager.getAllImports(sf.fileName).map((i) => {
|
|
@@ -3608,7 +3617,7 @@ function isImportStatement(stmt) {
|
|
|
3608
3617
|
return ts16.isImportDeclaration(stmt) || ts16.isImportEqualsDeclaration(stmt) || ts16.isNamespaceImport(stmt);
|
|
3609
3618
|
}
|
|
3610
3619
|
|
|
3611
|
-
// bazel-out/
|
|
3620
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
|
|
3612
3621
|
var DtsTransformRegistry = class {
|
|
3613
3622
|
constructor() {
|
|
3614
3623
|
this.ivyDeclarationTransforms = /* @__PURE__ */ new Map();
|
|
@@ -3733,11 +3742,11 @@ function markForEmitAsSingleLine(node) {
|
|
|
3733
3742
|
ts17.forEachChild(node, markForEmitAsSingleLine);
|
|
3734
3743
|
}
|
|
3735
3744
|
|
|
3736
|
-
// bazel-out/
|
|
3745
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
|
|
3737
3746
|
import { ConstantPool } from "@angular/compiler";
|
|
3738
3747
|
import ts19 from "typescript";
|
|
3739
3748
|
|
|
3740
|
-
// bazel-out/
|
|
3749
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
|
|
3741
3750
|
import ts18 from "typescript";
|
|
3742
3751
|
function visit(node, visitor, context) {
|
|
3743
3752
|
return visitor._visit(node, context);
|
|
@@ -3799,7 +3808,7 @@ function hasStatements(node) {
|
|
|
3799
3808
|
return block.statements !== void 0 && Array.isArray(block.statements);
|
|
3800
3809
|
}
|
|
3801
3810
|
|
|
3802
|
-
// bazel-out/
|
|
3811
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
|
|
3803
3812
|
var NO_DECORATORS = /* @__PURE__ */ new Set();
|
|
3804
3813
|
var CLOSURE_FILE_OVERVIEW_REGEXP = /\s+@fileoverview\s+/i;
|
|
3805
3814
|
function ivyTransformFactory(compilation, reflector, importRewriter, defaultImportTracker, perf, isCore, isClosureCompilerEnabled) {
|
|
@@ -3980,10 +3989,10 @@ function createRecorderFn(defaultImportTracker) {
|
|
|
3980
3989
|
};
|
|
3981
3990
|
}
|
|
3982
3991
|
|
|
3983
|
-
// bazel-out/
|
|
3992
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
|
|
3984
3993
|
import { compileClassMetadata, compileDeclareClassMetadata, compileDeclareDirectiveFromMetadata, compileDirectiveFromMetadata, FactoryTarget, makeBindingParser, WrappedNodeExpr as WrappedNodeExpr5 } from "@angular/compiler";
|
|
3985
3994
|
|
|
3986
|
-
// bazel-out/
|
|
3995
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
|
|
3987
3996
|
import { createMayBeForwardRefExpression, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr4, getSafePropertyAccessString, parseHostBindings, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr4 } from "@angular/compiler";
|
|
3988
3997
|
import ts20 from "typescript";
|
|
3989
3998
|
var EMPTY_OBJECT = {};
|
|
@@ -4347,7 +4356,7 @@ function evaluateHostExpressionBindings(hostExpr, evaluator) {
|
|
|
4347
4356
|
return bindings;
|
|
4348
4357
|
}
|
|
4349
4358
|
|
|
4350
|
-
// bazel-out/
|
|
4359
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.mjs
|
|
4351
4360
|
var DirectiveSymbol = class extends SemanticSymbol {
|
|
4352
4361
|
constructor(decl, selector, inputs, outputs, exportAs, typeCheckMeta, typeParameters) {
|
|
4353
4362
|
super(decl);
|
|
@@ -4424,7 +4433,7 @@ function isBaseClassEqual(current, previous) {
|
|
|
4424
4433
|
return isSymbolEqual(current, previous);
|
|
4425
4434
|
}
|
|
4426
4435
|
|
|
4427
|
-
// bazel-out/
|
|
4436
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
|
|
4428
4437
|
var FIELD_DECORATORS = [
|
|
4429
4438
|
"Input",
|
|
4430
4439
|
"Output",
|
|
@@ -4568,9 +4577,78 @@ var DirectiveDecoratorHandler = class {
|
|
|
4568
4577
|
}
|
|
4569
4578
|
};
|
|
4570
4579
|
|
|
4571
|
-
// bazel-out/
|
|
4580
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
|
|
4572
4581
|
import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, ExternalExpr as ExternalExpr5, FactoryTarget as FactoryTarget2, InvokeFunctionExpr, LiteralArrayExpr as LiteralArrayExpr2, R3Identifiers, R3SelectorScopeMode, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
|
|
4582
|
+
import ts22 from "typescript";
|
|
4583
|
+
|
|
4584
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
|
|
4573
4585
|
import ts21 from "typescript";
|
|
4586
|
+
function createModuleWithProvidersResolver(reflector, isCore) {
|
|
4587
|
+
function _reflectModuleFromTypeParam(type, node) {
|
|
4588
|
+
if (!ts21.isTypeReferenceNode(type)) {
|
|
4589
|
+
return null;
|
|
4590
|
+
}
|
|
4591
|
+
const typeName = type && (ts21.isIdentifier(type.typeName) && type.typeName || ts21.isQualifiedName(type.typeName) && type.typeName.right) || null;
|
|
4592
|
+
if (typeName === null) {
|
|
4593
|
+
return null;
|
|
4594
|
+
}
|
|
4595
|
+
const id = reflector.getImportOfIdentifier(typeName);
|
|
4596
|
+
if (id === null || id.name !== "ModuleWithProviders") {
|
|
4597
|
+
return null;
|
|
4598
|
+
}
|
|
4599
|
+
if (!isCore && id.from !== "@angular/core") {
|
|
4600
|
+
return null;
|
|
4601
|
+
}
|
|
4602
|
+
if (type.typeArguments === void 0 || type.typeArguments.length !== 1) {
|
|
4603
|
+
const parent = ts21.isMethodDeclaration(node) && ts21.isClassDeclaration(node.parent) ? node.parent : null;
|
|
4604
|
+
const symbolName = (parent && parent.name ? parent.name.getText() + "." : "") + (node.name ? node.name.getText() : "anonymous");
|
|
4605
|
+
throw new FatalDiagnosticError(ErrorCode.NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC, type, `${symbolName} returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.`);
|
|
4606
|
+
}
|
|
4607
|
+
const arg = type.typeArguments[0];
|
|
4608
|
+
return typeNodeToValueExpr(arg);
|
|
4609
|
+
}
|
|
4610
|
+
function _reflectModuleFromLiteralType(type) {
|
|
4611
|
+
if (!ts21.isIntersectionTypeNode(type)) {
|
|
4612
|
+
return null;
|
|
4613
|
+
}
|
|
4614
|
+
for (const t of type.types) {
|
|
4615
|
+
if (ts21.isTypeLiteralNode(t)) {
|
|
4616
|
+
for (const m of t.members) {
|
|
4617
|
+
const ngModuleType = ts21.isPropertySignature(m) && ts21.isIdentifier(m.name) && m.name.text === "ngModule" && m.type || null;
|
|
4618
|
+
const ngModuleExpression = ngModuleType && typeNodeToValueExpr(ngModuleType);
|
|
4619
|
+
if (ngModuleExpression) {
|
|
4620
|
+
return ngModuleExpression;
|
|
4621
|
+
}
|
|
4622
|
+
}
|
|
4623
|
+
}
|
|
4624
|
+
}
|
|
4625
|
+
return null;
|
|
4626
|
+
}
|
|
4627
|
+
return (fn, callExpr, resolve, unresolvable) => {
|
|
4628
|
+
var _a;
|
|
4629
|
+
const rawType = fn.node.type;
|
|
4630
|
+
if (rawType === void 0) {
|
|
4631
|
+
return unresolvable;
|
|
4632
|
+
}
|
|
4633
|
+
const type = (_a = _reflectModuleFromTypeParam(rawType, fn.node)) != null ? _a : _reflectModuleFromLiteralType(rawType);
|
|
4634
|
+
if (type === null) {
|
|
4635
|
+
return unresolvable;
|
|
4636
|
+
}
|
|
4637
|
+
const ngModule = resolve(type);
|
|
4638
|
+
if (!(ngModule instanceof Reference) || !isNamedClassDeclaration(ngModule.node)) {
|
|
4639
|
+
return unresolvable;
|
|
4640
|
+
}
|
|
4641
|
+
return new SyntheticValue({
|
|
4642
|
+
ngModule,
|
|
4643
|
+
mwpCall: callExpr
|
|
4644
|
+
});
|
|
4645
|
+
};
|
|
4646
|
+
}
|
|
4647
|
+
function isResolvedModuleWithProviders(sv) {
|
|
4648
|
+
return typeof sv.value === "object" && sv.value != null && sv.value.hasOwnProperty("ngModule") && sv.value.hasOwnProperty("mwpCall");
|
|
4649
|
+
}
|
|
4650
|
+
|
|
4651
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
|
|
4574
4652
|
var NgModuleSymbol = class extends SemanticSymbol {
|
|
4575
4653
|
constructor() {
|
|
4576
4654
|
super(...arguments);
|
|
@@ -4653,8 +4731,8 @@ var NgModuleDecoratorHandler = class {
|
|
|
4653
4731
|
if (decorator.args === null || decorator.args.length > 1) {
|
|
4654
4732
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, Decorator.nodeForError(decorator), `Incorrect number of arguments to @NgModule decorator`);
|
|
4655
4733
|
}
|
|
4656
|
-
const meta = decorator.args.length === 1 ? unwrapExpression(decorator.args[0]) :
|
|
4657
|
-
if (!
|
|
4734
|
+
const meta = decorator.args.length === 1 ? unwrapExpression(decorator.args[0]) : ts22.factory.createObjectLiteralExpression([]);
|
|
4735
|
+
if (!ts22.isObjectLiteralExpression(meta)) {
|
|
4658
4736
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@NgModule argument must be an object literal");
|
|
4659
4737
|
}
|
|
4660
4738
|
const ngModule = reflectObjectLiteral(meta);
|
|
@@ -4662,7 +4740,7 @@ var NgModuleDecoratorHandler = class {
|
|
|
4662
4740
|
return {};
|
|
4663
4741
|
}
|
|
4664
4742
|
const moduleResolvers = combineResolvers([
|
|
4665
|
-
(
|
|
4743
|
+
createModuleWithProvidersResolver(this.reflector, this.isCore),
|
|
4666
4744
|
forwardRefResolver
|
|
4667
4745
|
]);
|
|
4668
4746
|
const diagnostics = [];
|
|
@@ -4717,7 +4795,7 @@ var NgModuleDecoratorHandler = class {
|
|
|
4717
4795
|
id = new WrappedNodeExpr6(idExpr);
|
|
4718
4796
|
} else {
|
|
4719
4797
|
const diag = makeDiagnostic(ErrorCode.WARN_NGMODULE_ID_UNNECESSARY, idExpr, `Using 'module.id' for NgModule.id is a common anti-pattern that is ignored by the Angular compiler.`);
|
|
4720
|
-
diag.category =
|
|
4798
|
+
diag.category = ts22.DiagnosticCategory.Warning;
|
|
4721
4799
|
diagnostics.push(diag);
|
|
4722
4800
|
}
|
|
4723
4801
|
}
|
|
@@ -4755,9 +4833,9 @@ var NgModuleDecoratorHandler = class {
|
|
|
4755
4833
|
if (ngModule.has("imports")) {
|
|
4756
4834
|
const rawImports2 = unwrapExpression(ngModule.get("imports"));
|
|
4757
4835
|
let topLevelExpressions = [];
|
|
4758
|
-
if (
|
|
4836
|
+
if (ts22.isArrayLiteralExpression(rawImports2)) {
|
|
4759
4837
|
for (const element of rawImports2.elements) {
|
|
4760
|
-
if (
|
|
4838
|
+
if (ts22.isSpreadElement(element)) {
|
|
4761
4839
|
topLevelExpressions.push(element.expression);
|
|
4762
4840
|
continue;
|
|
4763
4841
|
}
|
|
@@ -4993,61 +5071,6 @@ var NgModuleDecoratorHandler = class {
|
|
|
4993
5071
|
return toR3Reference(origin, valueRef, typeRef, valueContext, typeContext, this.refEmitter);
|
|
4994
5072
|
}
|
|
4995
5073
|
}
|
|
4996
|
-
_extractModuleFromModuleWithProvidersFn(fn, node, resolve, unresolvable) {
|
|
4997
|
-
const rawType = fn.node.type || null;
|
|
4998
|
-
const type = rawType && (this._reflectModuleFromTypeParam(rawType, fn.node) || this._reflectModuleFromLiteralType(rawType));
|
|
4999
|
-
if (type === null) {
|
|
5000
|
-
return unresolvable;
|
|
5001
|
-
}
|
|
5002
|
-
const ngModule = resolve(type);
|
|
5003
|
-
if (!(ngModule instanceof Reference) || !isNamedClassDeclaration(ngModule.node)) {
|
|
5004
|
-
return unresolvable;
|
|
5005
|
-
}
|
|
5006
|
-
return new SyntheticValue({
|
|
5007
|
-
ngModule,
|
|
5008
|
-
mwpCall: node
|
|
5009
|
-
});
|
|
5010
|
-
}
|
|
5011
|
-
_reflectModuleFromTypeParam(type, node) {
|
|
5012
|
-
if (!ts21.isTypeReferenceNode(type)) {
|
|
5013
|
-
return null;
|
|
5014
|
-
}
|
|
5015
|
-
const typeName = type && (ts21.isIdentifier(type.typeName) && type.typeName || ts21.isQualifiedName(type.typeName) && type.typeName.right) || null;
|
|
5016
|
-
if (typeName === null) {
|
|
5017
|
-
return null;
|
|
5018
|
-
}
|
|
5019
|
-
const id = this.reflector.getImportOfIdentifier(typeName);
|
|
5020
|
-
if (id === null || id.name !== "ModuleWithProviders") {
|
|
5021
|
-
return null;
|
|
5022
|
-
}
|
|
5023
|
-
if (!this.isCore && id.from !== "@angular/core") {
|
|
5024
|
-
return null;
|
|
5025
|
-
}
|
|
5026
|
-
if (type.typeArguments === void 0 || type.typeArguments.length !== 1) {
|
|
5027
|
-
const parent = ts21.isMethodDeclaration(node) && ts21.isClassDeclaration(node.parent) ? node.parent : null;
|
|
5028
|
-
const symbolName = (parent && parent.name ? parent.name.getText() + "." : "") + (node.name ? node.name.getText() : "anonymous");
|
|
5029
|
-
throw new FatalDiagnosticError(ErrorCode.NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC, type, `${symbolName} returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.`);
|
|
5030
|
-
}
|
|
5031
|
-
const arg = type.typeArguments[0];
|
|
5032
|
-
return typeNodeToValueExpr(arg);
|
|
5033
|
-
}
|
|
5034
|
-
_reflectModuleFromLiteralType(type) {
|
|
5035
|
-
if (!ts21.isIntersectionTypeNode(type)) {
|
|
5036
|
-
return null;
|
|
5037
|
-
}
|
|
5038
|
-
for (const t of type.types) {
|
|
5039
|
-
if (ts21.isTypeLiteralNode(t)) {
|
|
5040
|
-
for (const m of t.members) {
|
|
5041
|
-
const ngModuleType = ts21.isPropertySignature(m) && ts21.isIdentifier(m.name) && m.name.text === "ngModule" && m.type || null;
|
|
5042
|
-
const ngModuleExpression = ngModuleType && typeNodeToValueExpr(ngModuleType);
|
|
5043
|
-
if (ngModuleExpression) {
|
|
5044
|
-
return ngModuleExpression;
|
|
5045
|
-
}
|
|
5046
|
-
}
|
|
5047
|
-
}
|
|
5048
|
-
}
|
|
5049
|
-
return null;
|
|
5050
|
-
}
|
|
5051
5074
|
isClassDeclarationReference(ref) {
|
|
5052
5075
|
return this.reflector.isClass(ref.node);
|
|
5053
5076
|
}
|
|
@@ -5091,10 +5114,7 @@ function isNgModule(node, compilation) {
|
|
|
5091
5114
|
return !compilation.dependencies.some((dep) => dep.ref.node === node);
|
|
5092
5115
|
}
|
|
5093
5116
|
function isModuleIdExpression(expr) {
|
|
5094
|
-
return
|
|
5095
|
-
}
|
|
5096
|
-
function isResolvedModuleWithProviders(sv) {
|
|
5097
|
-
return typeof sv.value === "object" && sv.value != null && sv.value.hasOwnProperty("ngModule") && sv.value.hasOwnProperty("mwpCall");
|
|
5117
|
+
return ts22.isPropertyAccessExpression(expr) && ts22.isIdentifier(expr.expression) && expr.expression.text === "module" && expr.name.text === "id";
|
|
5098
5118
|
}
|
|
5099
5119
|
function makeStandaloneBootstrapDiagnostic(ngModuleClass, bootstrappedClassRef, rawBootstrapExpr) {
|
|
5100
5120
|
const componentClassName = bootstrappedClassRef.node.name.text;
|
|
@@ -5103,7 +5123,7 @@ function makeStandaloneBootstrapDiagnostic(ngModuleClass, bootstrappedClassRef,
|
|
|
5103
5123
|
return makeDiagnostic(ErrorCode.NGMODULE_BOOTSTRAP_IS_STANDALONE, getDiagnosticNode(bootstrappedClassRef, rawBootstrapExpr), message, relatedInformation);
|
|
5104
5124
|
}
|
|
5105
5125
|
|
|
5106
|
-
// bazel-out/
|
|
5126
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.mjs
|
|
5107
5127
|
function makeCyclicImportInfo(ref, type, cycle) {
|
|
5108
5128
|
const name = ref.debugName || "(unknown)";
|
|
5109
5129
|
const path = cycle.getPath().map((sf) => sf.fileName).join(" -> ");
|
|
@@ -5126,9 +5146,9 @@ function checkCustomElementSelectorForErrors(selector) {
|
|
|
5126
5146
|
return null;
|
|
5127
5147
|
}
|
|
5128
5148
|
|
|
5129
|
-
// bazel-out/
|
|
5149
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.mjs
|
|
5130
5150
|
import { DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, ParseSourceFile as ParseSourceFile2, parseTemplate } from "@angular/compiler";
|
|
5131
|
-
import
|
|
5151
|
+
import ts23 from "typescript";
|
|
5132
5152
|
function getTemplateDeclarationNodeForError(declaration) {
|
|
5133
5153
|
switch (declaration.isInline) {
|
|
5134
5154
|
case true:
|
|
@@ -5145,7 +5165,7 @@ function extractTemplate(node, template, evaluator, depTracker, resourceLoader,
|
|
|
5145
5165
|
let sourceMapping;
|
|
5146
5166
|
let escapedString = false;
|
|
5147
5167
|
let sourceMapUrl;
|
|
5148
|
-
if (
|
|
5168
|
+
if (ts23.isStringLiteral(template.expression) || ts23.isNoSubstitutionTemplateLiteral(template.expression)) {
|
|
5149
5169
|
sourceParseRange = getTemplateRange(template.expression);
|
|
5150
5170
|
sourceStr = template.expression.getSourceFile().text;
|
|
5151
5171
|
templateContent = template.expression.text;
|
|
@@ -5303,7 +5323,7 @@ function preloadAndParseTemplate(evaluator, resourceLoader, depTracker, preanaly
|
|
|
5303
5323
|
}
|
|
5304
5324
|
function getTemplateRange(templateExpr) {
|
|
5305
5325
|
const startPos = templateExpr.getStart() + 1;
|
|
5306
|
-
const { line, character } =
|
|
5326
|
+
const { line, character } = ts23.getLineAndCharacterOfPosition(templateExpr.getSourceFile(), startPos);
|
|
5307
5327
|
return {
|
|
5308
5328
|
startPos,
|
|
5309
5329
|
startLine: line,
|
|
@@ -5336,7 +5356,7 @@ function transformDecoratorResources(dec, component, styles, template) {
|
|
|
5336
5356
|
const metadata = new Map(component);
|
|
5337
5357
|
if (metadata.has("templateUrl")) {
|
|
5338
5358
|
metadata.delete("templateUrl");
|
|
5339
|
-
metadata.set("template",
|
|
5359
|
+
metadata.set("template", ts23.factory.createStringLiteral(template.content));
|
|
5340
5360
|
}
|
|
5341
5361
|
if (metadata.has("styleUrls") || metadata.has("styles")) {
|
|
5342
5362
|
metadata.delete("styles");
|
|
@@ -5344,20 +5364,20 @@ function transformDecoratorResources(dec, component, styles, template) {
|
|
|
5344
5364
|
if (styles.length > 0) {
|
|
5345
5365
|
const styleNodes = styles.reduce((result, style) => {
|
|
5346
5366
|
if (style.trim().length > 0) {
|
|
5347
|
-
result.push(
|
|
5367
|
+
result.push(ts23.factory.createStringLiteral(style));
|
|
5348
5368
|
}
|
|
5349
5369
|
return result;
|
|
5350
5370
|
}, []);
|
|
5351
5371
|
if (styleNodes.length > 0) {
|
|
5352
|
-
metadata.set("styles",
|
|
5372
|
+
metadata.set("styles", ts23.factory.createArrayLiteralExpression(styleNodes));
|
|
5353
5373
|
}
|
|
5354
5374
|
}
|
|
5355
5375
|
}
|
|
5356
5376
|
const newMetadataFields = [];
|
|
5357
5377
|
for (const [name, value] of metadata.entries()) {
|
|
5358
|
-
newMetadataFields.push(
|
|
5378
|
+
newMetadataFields.push(ts23.factory.createPropertyAssignment(name, value));
|
|
5359
5379
|
}
|
|
5360
|
-
return __spreadProps(__spreadValues({}, dec), { args: [
|
|
5380
|
+
return __spreadProps(__spreadValues({}, dec), { args: [ts23.factory.createObjectLiteralExpression(newMetadataFields)] });
|
|
5361
5381
|
}
|
|
5362
5382
|
function extractComponentStyleUrls(evaluator, component) {
|
|
5363
5383
|
if (!component.has("styleUrls")) {
|
|
@@ -5367,9 +5387,9 @@ function extractComponentStyleUrls(evaluator, component) {
|
|
|
5367
5387
|
}
|
|
5368
5388
|
function extractStyleUrlsFromExpression(evaluator, styleUrlsExpr) {
|
|
5369
5389
|
const styleUrls = [];
|
|
5370
|
-
if (
|
|
5390
|
+
if (ts23.isArrayLiteralExpression(styleUrlsExpr)) {
|
|
5371
5391
|
for (const styleUrlExpr of styleUrlsExpr.elements) {
|
|
5372
|
-
if (
|
|
5392
|
+
if (ts23.isSpreadElement(styleUrlExpr)) {
|
|
5373
5393
|
styleUrls.push(...extractStyleUrlsFromExpression(evaluator, styleUrlExpr.expression));
|
|
5374
5394
|
} else {
|
|
5375
5395
|
const styleUrl = evaluator.evaluate(styleUrlExpr);
|
|
@@ -5401,10 +5421,10 @@ function extractStyleUrlsFromExpression(evaluator, styleUrlsExpr) {
|
|
|
5401
5421
|
function extractStyleResources(resourceLoader, component, containingFile) {
|
|
5402
5422
|
const styles = /* @__PURE__ */ new Set();
|
|
5403
5423
|
function stringLiteralElements(array) {
|
|
5404
|
-
return array.elements.filter((e) =>
|
|
5424
|
+
return array.elements.filter((e) => ts23.isStringLiteralLike(e));
|
|
5405
5425
|
}
|
|
5406
5426
|
const styleUrlsExpr = component.get("styleUrls");
|
|
5407
|
-
if (styleUrlsExpr !== void 0 &&
|
|
5427
|
+
if (styleUrlsExpr !== void 0 && ts23.isArrayLiteralExpression(styleUrlsExpr)) {
|
|
5408
5428
|
for (const expression of stringLiteralElements(styleUrlsExpr)) {
|
|
5409
5429
|
try {
|
|
5410
5430
|
const resourceUrl = resourceLoader.resolve(expression.text, containingFile);
|
|
@@ -5414,7 +5434,7 @@ function extractStyleResources(resourceLoader, component, containingFile) {
|
|
|
5414
5434
|
}
|
|
5415
5435
|
}
|
|
5416
5436
|
const stylesExpr = component.get("styles");
|
|
5417
|
-
if (stylesExpr !== void 0 &&
|
|
5437
|
+
if (stylesExpr !== void 0 && ts23.isArrayLiteralExpression(stylesExpr)) {
|
|
5418
5438
|
for (const expression of stringLiteralElements(stylesExpr)) {
|
|
5419
5439
|
styles.add({ path: null, expression });
|
|
5420
5440
|
}
|
|
@@ -5429,7 +5449,7 @@ function _extractTemplateStyleUrls(template) {
|
|
|
5429
5449
|
return template.styleUrls.map((url) => ({ url, source: 1, nodeForError }));
|
|
5430
5450
|
}
|
|
5431
5451
|
|
|
5432
|
-
// bazel-out/
|
|
5452
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.mjs
|
|
5433
5453
|
var ComponentSymbol = class extends DirectiveSymbol {
|
|
5434
5454
|
constructor() {
|
|
5435
5455
|
super(...arguments);
|
|
@@ -5464,7 +5484,7 @@ var ComponentSymbol = class extends DirectiveSymbol {
|
|
|
5464
5484
|
}
|
|
5465
5485
|
};
|
|
5466
5486
|
|
|
5467
|
-
// bazel-out/
|
|
5487
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/util.mjs
|
|
5468
5488
|
function collectAnimationNames(value, animationTriggerNames) {
|
|
5469
5489
|
if (value instanceof Map) {
|
|
5470
5490
|
const name = value.get("name");
|
|
@@ -5518,14 +5538,29 @@ function validateAndFlattenComponentImports(imports, expr) {
|
|
|
5518
5538
|
} else {
|
|
5519
5539
|
diagnostics.push(createValueHasWrongTypeError(ref.getOriginForDiagnostics(expr), ref, `'imports' must be an array of components, directives, pipes, or NgModules`).toDiagnostic());
|
|
5520
5540
|
}
|
|
5541
|
+
} else if (isLikelyModuleWithProviders(ref)) {
|
|
5542
|
+
let origin = expr;
|
|
5543
|
+
if (ref instanceof SyntheticValue) {
|
|
5544
|
+
origin = getOriginNodeForDiagnostics(ref.value.mwpCall, expr);
|
|
5545
|
+
}
|
|
5546
|
+
diagnostics.push(makeDiagnostic(ErrorCode.COMPONENT_UNKNOWN_IMPORT, origin, `'imports' contains a ModuleWithProviders value, likely the result of a 'Module.forRoot()'-style call. These calls are not used to configure components and are not valid in standalone component imports - consider importing them in the application bootstrap instead.`));
|
|
5521
5547
|
} else {
|
|
5522
5548
|
diagnostics.push(createValueHasWrongTypeError(expr, imports, `'imports' must be an array of components, directives, pipes, or NgModules`).toDiagnostic());
|
|
5523
5549
|
}
|
|
5524
5550
|
}
|
|
5525
5551
|
return { imports: flattened, diagnostics };
|
|
5526
5552
|
}
|
|
5553
|
+
function isLikelyModuleWithProviders(value) {
|
|
5554
|
+
if (value instanceof SyntheticValue && isResolvedModuleWithProviders(value)) {
|
|
5555
|
+
return true;
|
|
5556
|
+
}
|
|
5557
|
+
if (value instanceof Map && value.has("ngModule")) {
|
|
5558
|
+
return true;
|
|
5559
|
+
}
|
|
5560
|
+
return false;
|
|
5561
|
+
}
|
|
5527
5562
|
|
|
5528
|
-
// bazel-out/
|
|
5563
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
|
|
5529
5564
|
var EMPTY_ARRAY = [];
|
|
5530
5565
|
var ComponentDecoratorHandler = class {
|
|
5531
5566
|
constructor(reflector, evaluator, metaRegistry, metaReader, scopeReader, dtsScopeReader, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, resourceLoader, rootDirs, defaultPreserveWhitespaces, i18nUseExternalIds, enableI18nLegacyMessageIdFormat, usePoisonedData, i18nNormalizeLineEndingsInICUs, moduleResolver, cycleAnalyzer, cycleHandlingStrategy, refEmitter, depTracker, injectableRegistry, semanticDepGraphUpdater, annotateForClosureCompiler, perf) {
|
|
@@ -5675,7 +5710,11 @@ var ComponentDecoratorHandler = class {
|
|
|
5675
5710
|
isPoisoned = true;
|
|
5676
5711
|
} else if (component.has("imports")) {
|
|
5677
5712
|
const expr = component.get("imports");
|
|
5678
|
-
const
|
|
5713
|
+
const importResolvers = combineResolvers([
|
|
5714
|
+
createModuleWithProvidersResolver(this.reflector, this.isCore),
|
|
5715
|
+
forwardRefResolver
|
|
5716
|
+
]);
|
|
5717
|
+
const imported = this.evaluator.evaluate(expr, importResolvers);
|
|
5679
5718
|
const { imports: flattened, diagnostics: importDiagnostics } = validateAndFlattenComponentImports(imported, expr);
|
|
5680
5719
|
resolvedImports = flattened;
|
|
5681
5720
|
rawImports = expr;
|
|
@@ -5869,7 +5908,7 @@ var ComponentDecoratorHandler = class {
|
|
|
5869
5908
|
});
|
|
5870
5909
|
}
|
|
5871
5910
|
typeCheck(ctx, node, meta) {
|
|
5872
|
-
if (this.typeCheckScopeRegistry === null || !
|
|
5911
|
+
if (this.typeCheckScopeRegistry === null || !ts24.isClassDeclaration(node)) {
|
|
5873
5912
|
return;
|
|
5874
5913
|
}
|
|
5875
5914
|
if (meta.isPoisoned && !this.usePoisonedData) {
|
|
@@ -5880,7 +5919,7 @@ var ComponentDecoratorHandler = class {
|
|
|
5880
5919
|
return;
|
|
5881
5920
|
}
|
|
5882
5921
|
const binder = new R3TargetBinder(scope.matcher);
|
|
5883
|
-
ctx.addTemplate(new Reference(node), binder, meta.template.diagNodes, scope.pipes, scope.schemas, meta.template.sourceMapping, meta.template.file, meta.template.errors);
|
|
5922
|
+
ctx.addTemplate(new Reference(node), binder, meta.template.diagNodes, scope.pipes, scope.schemas, meta.template.sourceMapping, meta.template.file, meta.template.errors, meta.meta.isStandalone);
|
|
5884
5923
|
}
|
|
5885
5924
|
extendedTemplateCheck(component, extendedTemplateChecker) {
|
|
5886
5925
|
return extendedTemplateChecker.getDiagnosticsForComponent(component);
|
|
@@ -6148,9 +6187,9 @@ function validateStandaloneImports(importRefs, importExpr, metaReader, scopeRead
|
|
|
6148
6187
|
return diagnostics;
|
|
6149
6188
|
}
|
|
6150
6189
|
|
|
6151
|
-
// bazel-out/
|
|
6190
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
|
|
6152
6191
|
import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression2, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr8 } from "@angular/compiler";
|
|
6153
|
-
import
|
|
6192
|
+
import ts25 from "typescript";
|
|
6154
6193
|
var InjectableDecoratorHandler = class {
|
|
6155
6194
|
constructor(reflector, isCore, strictCtorDeps, injectableRegistry, perf, errorOnDuplicateProv = true) {
|
|
6156
6195
|
this.reflector = reflector;
|
|
@@ -6241,7 +6280,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
|
|
|
6241
6280
|
};
|
|
6242
6281
|
} else if (decorator.args.length === 1) {
|
|
6243
6282
|
const metaNode = decorator.args[0];
|
|
6244
|
-
if (!
|
|
6283
|
+
if (!ts25.isObjectLiteralExpression(metaNode)) {
|
|
6245
6284
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, metaNode, `@Injectable argument must be an object literal`);
|
|
6246
6285
|
}
|
|
6247
6286
|
const meta = reflectObjectLiteral(metaNode);
|
|
@@ -6249,7 +6288,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
|
|
|
6249
6288
|
let deps = void 0;
|
|
6250
6289
|
if ((meta.has("useClass") || meta.has("useFactory")) && meta.has("deps")) {
|
|
6251
6290
|
const depsExpr = meta.get("deps");
|
|
6252
|
-
if (!
|
|
6291
|
+
if (!ts25.isArrayLiteralExpression(depsExpr)) {
|
|
6253
6292
|
throw new FatalDiagnosticError(ErrorCode.VALUE_NOT_LITERAL, depsExpr, `@Injectable deps metadata must be an inline array`);
|
|
6254
6293
|
}
|
|
6255
6294
|
deps = depsExpr.elements.map((dep) => getDep(dep, reflector));
|
|
@@ -6331,12 +6370,12 @@ function getDep(dep, reflector) {
|
|
|
6331
6370
|
}
|
|
6332
6371
|
return true;
|
|
6333
6372
|
}
|
|
6334
|
-
if (
|
|
6373
|
+
if (ts25.isArrayLiteralExpression(dep)) {
|
|
6335
6374
|
dep.elements.forEach((el) => {
|
|
6336
6375
|
let isDecorator = false;
|
|
6337
|
-
if (
|
|
6376
|
+
if (ts25.isIdentifier(el)) {
|
|
6338
6377
|
isDecorator = maybeUpdateDecorator(el, reflector);
|
|
6339
|
-
} else if (
|
|
6378
|
+
} else if (ts25.isNewExpression(el) && ts25.isIdentifier(el.expression)) {
|
|
6340
6379
|
const token = el.arguments && el.arguments.length > 0 && el.arguments[0] || void 0;
|
|
6341
6380
|
isDecorator = maybeUpdateDecorator(el.expression, reflector, token);
|
|
6342
6381
|
}
|
|
@@ -6348,9 +6387,9 @@ function getDep(dep, reflector) {
|
|
|
6348
6387
|
return meta;
|
|
6349
6388
|
}
|
|
6350
6389
|
|
|
6351
|
-
// bazel-out/
|
|
6390
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
|
|
6352
6391
|
import { compileClassMetadata as compileClassMetadata5, compileDeclareClassMetadata as compileDeclareClassMetadata5, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5, WrappedNodeExpr as WrappedNodeExpr9 } from "@angular/compiler";
|
|
6353
|
-
import
|
|
6392
|
+
import ts26 from "typescript";
|
|
6354
6393
|
var PipeSymbol = class extends SemanticSymbol {
|
|
6355
6394
|
constructor(decl, name) {
|
|
6356
6395
|
super(decl);
|
|
@@ -6405,7 +6444,7 @@ var PipeDecoratorHandler = class {
|
|
|
6405
6444
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, Decorator.nodeForError(decorator), "@Pipe must have exactly one argument");
|
|
6406
6445
|
}
|
|
6407
6446
|
const meta = unwrapExpression(decorator.args[0]);
|
|
6408
|
-
if (!
|
|
6447
|
+
if (!ts26.isObjectLiteralExpression(meta)) {
|
|
6409
6448
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@Pipe must have a literal argument");
|
|
6410
6449
|
}
|
|
6411
6450
|
const pipe = reflectObjectLiteral(meta);
|
|
@@ -6530,4 +6569,4 @@ export {
|
|
|
6530
6569
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6531
6570
|
* found in the LICENSE file at https://angular.io/license
|
|
6532
6571
|
*/
|
|
6533
|
-
//# sourceMappingURL=chunk-
|
|
6572
|
+
//# sourceMappingURL=chunk-VSZPIAX6.js.map
|