@angular/compiler-cli 19.0.0-next.9 → 19.0.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.
- package/bundles/{chunk-5W3ITOS7.js → chunk-4W4CWRSP.js} +5 -5
- package/bundles/{chunk-3Z25BX6N.js → chunk-5UDS2TPQ.js} +25 -18
- package/bundles/chunk-5UDS2TPQ.js.map +6 -0
- package/bundles/{chunk-RT2QTF73.js → chunk-GBKXY6BH.js} +4 -3
- package/bundles/{chunk-RT2QTF73.js.map → chunk-GBKXY6BH.js.map} +1 -1
- package/bundles/{chunk-XSNUHRLJ.js → chunk-I6R3GL3L.js} +12 -6
- package/bundles/{chunk-XSNUHRLJ.js.map → chunk-I6R3GL3L.js.map} +1 -1
- package/bundles/{chunk-XI2RTGAL.js → chunk-KPQ72R34.js} +9 -2
- package/bundles/{chunk-XP6IMCQP.js → chunk-NS33RCEE.js} +12 -12
- package/bundles/{chunk-JF4LKQQP.js → chunk-PXQLBKVP.js} +88 -51
- package/bundles/chunk-PXQLBKVP.js.map +6 -0
- package/bundles/{chunk-GCXHOI3T.js → chunk-S2JI2WY5.js} +948 -365
- package/bundles/chunk-S2JI2WY5.js.map +6 -0
- package/bundles/{chunk-UJ2J6WV4.js → chunk-STORTTKY.js} +16 -14
- package/bundles/chunk-STORTTKY.js.map +6 -0
- package/bundles/{chunk-U6J7NRJM.js → chunk-TQQOHNLL.js} +288 -173
- package/bundles/chunk-TQQOHNLL.js.map +6 -0
- package/bundles/{chunk-OSPR7JSU.js → chunk-TRCFFQ47.js} +147 -82
- package/bundles/chunk-TRCFFQ47.js.map +6 -0
- package/bundles/{chunk-ZQ7CP635.js → chunk-V2Z4WDVR.js} +3 -3
- package/bundles/index.js +18 -17
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +32 -32
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +5 -5
- package/bundles/ngcc/index.js +1 -1
- package/bundles/private/bazel.js +2 -2
- package/bundles/private/localize.js +4 -4
- package/bundles/private/migrations.js +5 -5
- package/bundles/private/tooling.js +7 -7
- package/bundles/src/bin/ng_xi18n.js +11 -11
- package/bundles/src/bin/ngc.js +9 -9
- package/bundles_metadata.json +1 -1
- package/linker/babel/src/ast/babel_ast_factory.d.ts +2 -2
- package/linker/src/file_linker/partial_linkers/partial_directive_linker_1.d.ts +2 -2
- package/linker/src/file_linker/partial_linkers/partial_pipe_linker_1.d.ts +2 -2
- package/linker/src/file_linker/partial_linkers/util.d.ts +2 -1
- package/package.json +2 -2
- package/src/ngtsc/annotations/common/src/debug_info.d.ts +2 -1
- package/src/ngtsc/annotations/common/src/util.d.ts +1 -1
- package/src/ngtsc/annotations/component/src/handler.d.ts +8 -3
- package/src/ngtsc/annotations/directive/src/handler.d.ts +2 -1
- package/src/ngtsc/annotations/directive/src/shared.d.ts +1 -1
- package/src/ngtsc/annotations/src/pipe.d.ts +2 -1
- package/src/ngtsc/core/src/compiler.d.ts +7 -0
- package/src/ngtsc/hmr/index.d.ts +9 -0
- package/src/ngtsc/hmr/src/extract_locals.d.ts +20 -0
- package/src/ngtsc/hmr/src/metadata.d.ts +23 -0
- package/src/ngtsc/hmr/src/update_declaration.d.ts +17 -0
- package/src/ngtsc/imports/src/core.d.ts +6 -0
- package/src/ngtsc/transform/src/api.d.ts +4 -0
- package/src/ngtsc/transform/src/compilation.d.ts +1 -0
- package/src/ngtsc/translator/src/api/ast_factory.d.ts +2 -2
- package/src/ngtsc/translator/src/typescript_ast_factory.d.ts +2 -2
- package/src/ngtsc/util/src/path.d.ts +9 -0
- package/bundles/chunk-3Z25BX6N.js.map +0 -6
- package/bundles/chunk-GCXHOI3T.js.map +0 -6
- package/bundles/chunk-JF4LKQQP.js.map +0 -6
- package/bundles/chunk-OSPR7JSU.js.map +0 -6
- package/bundles/chunk-U6J7NRJM.js.map +0 -6
- package/bundles/chunk-UJ2J6WV4.js.map +0 -6
- /package/bundles/{chunk-5W3ITOS7.js.map → chunk-4W4CWRSP.js.map} +0 -0
- /package/bundles/{chunk-XI2RTGAL.js.map → chunk-KPQ72R34.js.map} +0 -0
- /package/bundles/{chunk-XP6IMCQP.js.map → chunk-NS33RCEE.js.map} +0 -0
- /package/bundles/{chunk-ZQ7CP635.js.map → chunk-V2Z4WDVR.js.map} +0 -0
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
resolve,
|
|
13
13
|
stripExtension,
|
|
14
14
|
toRelativeImport
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-STORTTKY.js";
|
|
16
16
|
|
|
17
|
-
// bazel-out/
|
|
17
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error.mjs
|
|
18
18
|
import ts from "typescript";
|
|
19
19
|
|
|
20
|
-
// bazel-out/
|
|
20
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.mjs
|
|
21
21
|
var ErrorCode;
|
|
22
22
|
(function(ErrorCode2) {
|
|
23
23
|
ErrorCode2[ErrorCode2["DECORATOR_ARG_NOT_LITERAL"] = 1001] = "DECORATOR_ARG_NOT_LITERAL";
|
|
@@ -114,7 +114,7 @@ var ErrorCode;
|
|
|
114
114
|
ErrorCode2[ErrorCode2["LOCAL_COMPILATION_UNSUPPORTED_EXPRESSION"] = 11003] = "LOCAL_COMPILATION_UNSUPPORTED_EXPRESSION";
|
|
115
115
|
})(ErrorCode || (ErrorCode = {}));
|
|
116
116
|
|
|
117
|
-
// bazel-out/
|
|
117
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/util.mjs
|
|
118
118
|
var ERROR_CODE_MATCHER = /(\u001b\[\d+m ?)TS-99(\d+: ?\u001b\[\d+m)/g;
|
|
119
119
|
function replaceTsWithNgInErrors(errors) {
|
|
120
120
|
return errors.replace(ERROR_CODE_MATCHER, "$1NG$2");
|
|
@@ -123,17 +123,21 @@ function ngErrorCode(code) {
|
|
|
123
123
|
return parseInt("-99" + code);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
// bazel-out/
|
|
126
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error.mjs
|
|
127
127
|
var FatalDiagnosticError = class extends Error {
|
|
128
|
+
code;
|
|
129
|
+
node;
|
|
130
|
+
diagnosticMessage;
|
|
131
|
+
relatedInformation;
|
|
128
132
|
constructor(code, node, diagnosticMessage, relatedInformation) {
|
|
129
133
|
super(`FatalDiagnosticError: Code: ${code}, Message: ${ts.flattenDiagnosticMessageText(diagnosticMessage, "\n")}`);
|
|
130
134
|
this.code = code;
|
|
131
135
|
this.node = node;
|
|
132
136
|
this.diagnosticMessage = diagnosticMessage;
|
|
133
137
|
this.relatedInformation = relatedInformation;
|
|
134
|
-
this._isFatalDiagnosticError = true;
|
|
135
138
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
136
139
|
}
|
|
140
|
+
_isFatalDiagnosticError = true;
|
|
137
141
|
toDiagnostic() {
|
|
138
142
|
return makeDiagnostic(this.code, this.node, this.diagnosticMessage, this.relatedInformation);
|
|
139
143
|
}
|
|
@@ -187,7 +191,7 @@ function isLocalCompilationDiagnostics(diagnostic) {
|
|
|
187
191
|
return diagnostic.code === ngErrorCode(ErrorCode.LOCAL_COMPILATION_UNRESOLVED_CONST) || diagnostic.code === ngErrorCode(ErrorCode.LOCAL_COMPILATION_UNSUPPORTED_EXPRESSION);
|
|
188
192
|
}
|
|
189
193
|
|
|
190
|
-
// bazel-out/
|
|
194
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/docs.mjs
|
|
191
195
|
var COMPILER_ERRORS_WITH_GUIDES = /* @__PURE__ */ new Set([
|
|
192
196
|
ErrorCode.DECORATOR_ARG_NOT_LITERAL,
|
|
193
197
|
ErrorCode.IMPORT_CYCLE_DETECTED,
|
|
@@ -199,10 +203,10 @@ var COMPILER_ERRORS_WITH_GUIDES = /* @__PURE__ */ new Set([
|
|
|
199
203
|
ErrorCode.WARN_NGMODULE_ID_UNNECESSARY
|
|
200
204
|
]);
|
|
201
205
|
|
|
202
|
-
// bazel-out/
|
|
206
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.mjs
|
|
203
207
|
var ERROR_DETAILS_PAGE_BASE_URL = "https://angular.dev/errors";
|
|
204
208
|
|
|
205
|
-
// bazel-out/
|
|
209
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.mjs
|
|
206
210
|
var ExtendedTemplateDiagnosticName;
|
|
207
211
|
(function(ExtendedTemplateDiagnosticName2) {
|
|
208
212
|
ExtendedTemplateDiagnosticName2["INVALID_BANANA_IN_BOX"] = "invalidBananaInBox";
|
|
@@ -220,10 +224,10 @@ var ExtendedTemplateDiagnosticName;
|
|
|
220
224
|
ExtendedTemplateDiagnosticName2["UNUSED_STANDALONE_IMPORTS"] = "unusedStandaloneImports";
|
|
221
225
|
})(ExtendedTemplateDiagnosticName || (ExtendedTemplateDiagnosticName = {}));
|
|
222
226
|
|
|
223
|
-
// bazel-out/
|
|
227
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/reflection/src/typescript.mjs
|
|
224
228
|
import ts5 from "typescript";
|
|
225
229
|
|
|
226
|
-
// bazel-out/
|
|
230
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/reflection/src/host.mjs
|
|
227
231
|
import ts2 from "typescript";
|
|
228
232
|
function isDecoratorIdentifier(exp) {
|
|
229
233
|
return ts2.isIdentifier(exp) || ts2.isPropertyAccessExpression(exp) && ts2.isIdentifier(exp.expression) && ts2.isIdentifier(exp.name);
|
|
@@ -246,7 +250,7 @@ var ClassMemberAccessLevel;
|
|
|
246
250
|
})(ClassMemberAccessLevel || (ClassMemberAccessLevel = {}));
|
|
247
251
|
var AmbientImport = {};
|
|
248
252
|
|
|
249
|
-
// bazel-out/
|
|
253
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/reflection/src/type_to_value.mjs
|
|
250
254
|
import ts3 from "typescript";
|
|
251
255
|
function typeToValue(typeNode, checker, isLocalCompilation) {
|
|
252
256
|
var _a, _b;
|
|
@@ -430,7 +434,7 @@ function extractModuleName(node) {
|
|
|
430
434
|
return node.moduleSpecifier.text;
|
|
431
435
|
}
|
|
432
436
|
|
|
433
|
-
// bazel-out/
|
|
437
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/reflection/src/util.mjs
|
|
434
438
|
import ts4 from "typescript";
|
|
435
439
|
function isNamedClassDeclaration(node) {
|
|
436
440
|
return ts4.isClassDeclaration(node) && isIdentifier(node.name);
|
|
@@ -454,8 +458,10 @@ function classMemberAccessLevelToString(level) {
|
|
|
454
458
|
}
|
|
455
459
|
}
|
|
456
460
|
|
|
457
|
-
// bazel-out/
|
|
461
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/reflection/src/typescript.mjs
|
|
458
462
|
var TypeScriptReflectionHost = class {
|
|
463
|
+
checker;
|
|
464
|
+
isLocalCompilation;
|
|
459
465
|
constructor(checker, isLocalCompilation = false) {
|
|
460
466
|
this.checker = checker;
|
|
461
467
|
this.isLocalCompilation = isLocalCompilation;
|
|
@@ -942,7 +948,7 @@ function getExportedName(decl, originalId) {
|
|
|
942
948
|
}
|
|
943
949
|
var LocalExportedDeclarations = Symbol("LocalExportedDeclarations");
|
|
944
950
|
|
|
945
|
-
// bazel-out/
|
|
951
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/typescript.mjs
|
|
946
952
|
import ts6 from "typescript";
|
|
947
953
|
var TS = /\.tsx?$/i;
|
|
948
954
|
var D_TS = /\.d\.ts$/i;
|
|
@@ -1043,13 +1049,16 @@ function toUnredirectedSourceFile(sf) {
|
|
|
1043
1049
|
return redirectInfo.unredirected;
|
|
1044
1050
|
}
|
|
1045
1051
|
|
|
1046
|
-
// bazel-out/
|
|
1052
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/references.mjs
|
|
1047
1053
|
var Reference = class {
|
|
1054
|
+
node;
|
|
1055
|
+
bestGuessOwningModule;
|
|
1056
|
+
identifiers = [];
|
|
1057
|
+
synthetic = false;
|
|
1058
|
+
_alias = null;
|
|
1059
|
+
isAmbient;
|
|
1048
1060
|
constructor(node, bestGuessOwningModule = null) {
|
|
1049
1061
|
this.node = node;
|
|
1050
|
-
this.identifiers = [];
|
|
1051
|
-
this.synthetic = false;
|
|
1052
|
-
this._alias = null;
|
|
1053
1062
|
if (bestGuessOwningModule === AmbientImport) {
|
|
1054
1063
|
this.isAmbient = true;
|
|
1055
1064
|
this.bestGuessOwningModule = null;
|
|
@@ -1112,14 +1121,14 @@ var Reference = class {
|
|
|
1112
1121
|
}
|
|
1113
1122
|
};
|
|
1114
1123
|
|
|
1115
|
-
// bazel-out/
|
|
1124
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/alias.mjs
|
|
1116
1125
|
import { ExternalExpr as ExternalExpr2 } from "@angular/compiler";
|
|
1117
1126
|
|
|
1118
|
-
// bazel-out/
|
|
1127
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/emitter.mjs
|
|
1119
1128
|
import { ExternalExpr, ExternalReference, WrappedNodeExpr } from "@angular/compiler";
|
|
1120
1129
|
import ts7 from "typescript";
|
|
1121
1130
|
|
|
1122
|
-
// bazel-out/
|
|
1131
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/find_export.mjs
|
|
1123
1132
|
function findExportedNameOfNode(target, file, reflector) {
|
|
1124
1133
|
const exports = reflector.getExportsOfModule(file);
|
|
1125
1134
|
if (exports === null) {
|
|
@@ -1139,7 +1148,7 @@ function findExportedNameOfNode(target, file, reflector) {
|
|
|
1139
1148
|
return foundExportName;
|
|
1140
1149
|
}
|
|
1141
1150
|
|
|
1142
|
-
// bazel-out/
|
|
1151
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/emitter.mjs
|
|
1143
1152
|
var ImportFlags;
|
|
1144
1153
|
(function(ImportFlags2) {
|
|
1145
1154
|
ImportFlags2[ImportFlags2["None"] = 0] = "None";
|
|
@@ -1159,6 +1168,7 @@ function assertSuccessfulReferenceEmit(result, origin, typeKind) {
|
|
|
1159
1168
|
]);
|
|
1160
1169
|
}
|
|
1161
1170
|
var ReferenceEmitter = class {
|
|
1171
|
+
strategies;
|
|
1162
1172
|
constructor(strategies) {
|
|
1163
1173
|
this.strategies = strategies;
|
|
1164
1174
|
}
|
|
@@ -1215,12 +1225,16 @@ var LocalIdentifierStrategy = class {
|
|
|
1215
1225
|
}
|
|
1216
1226
|
};
|
|
1217
1227
|
var AbsoluteModuleStrategy = class {
|
|
1228
|
+
program;
|
|
1229
|
+
checker;
|
|
1230
|
+
moduleResolver;
|
|
1231
|
+
reflectionHost;
|
|
1232
|
+
moduleExportsCache = /* @__PURE__ */ new Map();
|
|
1218
1233
|
constructor(program, checker, moduleResolver, reflectionHost) {
|
|
1219
1234
|
this.program = program;
|
|
1220
1235
|
this.checker = checker;
|
|
1221
1236
|
this.moduleResolver = moduleResolver;
|
|
1222
1237
|
this.reflectionHost = reflectionHost;
|
|
1223
|
-
this.moduleExportsCache = /* @__PURE__ */ new Map();
|
|
1224
1238
|
}
|
|
1225
1239
|
emit(ref, context, importFlags) {
|
|
1226
1240
|
if (ref.bestGuessOwningModule === null) {
|
|
@@ -1283,6 +1297,9 @@ var AbsoluteModuleStrategy = class {
|
|
|
1283
1297
|
}
|
|
1284
1298
|
};
|
|
1285
1299
|
var LogicalProjectStrategy = class {
|
|
1300
|
+
reflector;
|
|
1301
|
+
logicalFs;
|
|
1302
|
+
relativePathStrategy;
|
|
1286
1303
|
constructor(reflector, logicalFs) {
|
|
1287
1304
|
this.reflector = reflector;
|
|
1288
1305
|
this.logicalFs = logicalFs;
|
|
@@ -1327,6 +1344,7 @@ var LogicalProjectStrategy = class {
|
|
|
1327
1344
|
}
|
|
1328
1345
|
};
|
|
1329
1346
|
var RelativePathStrategy = class {
|
|
1347
|
+
reflector;
|
|
1330
1348
|
constructor(reflector) {
|
|
1331
1349
|
this.reflector = reflector;
|
|
1332
1350
|
}
|
|
@@ -1351,6 +1369,8 @@ var RelativePathStrategy = class {
|
|
|
1351
1369
|
}
|
|
1352
1370
|
};
|
|
1353
1371
|
var UnifiedModulesStrategy = class {
|
|
1372
|
+
reflector;
|
|
1373
|
+
unifiedModulesHost;
|
|
1354
1374
|
constructor(reflector, unifiedModulesHost) {
|
|
1355
1375
|
this.reflector = reflector;
|
|
1356
1376
|
this.unifiedModulesHost = unifiedModulesHost;
|
|
@@ -1370,13 +1390,14 @@ var UnifiedModulesStrategy = class {
|
|
|
1370
1390
|
}
|
|
1371
1391
|
};
|
|
1372
1392
|
|
|
1373
|
-
// bazel-out/
|
|
1393
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/alias.mjs
|
|
1374
1394
|
var CHARS_TO_ESCAPE = /[^a-zA-Z0-9/_]/g;
|
|
1375
1395
|
var UnifiedModulesAliasingHost = class {
|
|
1396
|
+
unifiedModulesHost;
|
|
1376
1397
|
constructor(unifiedModulesHost) {
|
|
1377
1398
|
this.unifiedModulesHost = unifiedModulesHost;
|
|
1378
|
-
this.aliasExportsInDts = false;
|
|
1379
1399
|
}
|
|
1400
|
+
aliasExportsInDts = false;
|
|
1380
1401
|
maybeAliasSymbolAs(ref, context, ngModuleName, isReExport) {
|
|
1381
1402
|
if (!isReExport) {
|
|
1382
1403
|
return null;
|
|
@@ -1397,10 +1418,11 @@ var UnifiedModulesAliasingHost = class {
|
|
|
1397
1418
|
}
|
|
1398
1419
|
};
|
|
1399
1420
|
var PrivateExportAliasingHost = class {
|
|
1421
|
+
host;
|
|
1400
1422
|
constructor(host) {
|
|
1401
1423
|
this.host = host;
|
|
1402
|
-
this.aliasExportsInDts = true;
|
|
1403
1424
|
}
|
|
1425
|
+
aliasExportsInDts = true;
|
|
1404
1426
|
maybeAliasSymbolAs(ref, context, ngModuleName) {
|
|
1405
1427
|
if (ref.hasOwningModuleGuess) {
|
|
1406
1428
|
return null;
|
|
@@ -1437,7 +1459,7 @@ var AliasStrategy = class {
|
|
|
1437
1459
|
}
|
|
1438
1460
|
};
|
|
1439
1461
|
|
|
1440
|
-
// bazel-out/
|
|
1462
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/path.mjs
|
|
1441
1463
|
function relativePathBetween(from, to) {
|
|
1442
1464
|
const relativePath = stripExtension(relative(dirname(resolve(from)), resolve(to)));
|
|
1443
1465
|
return relativePath !== "" ? toRelativeImport(relativePath) : null;
|
|
@@ -1445,8 +1467,18 @@ function relativePathBetween(from, to) {
|
|
|
1445
1467
|
function normalizeSeparators(path) {
|
|
1446
1468
|
return path.replace(/\\/g, "/");
|
|
1447
1469
|
}
|
|
1470
|
+
function getProjectRelativePath(sourceFile, rootDirs, compilerHost) {
|
|
1471
|
+
const filePath = compilerHost.getCanonicalFileName(sourceFile.fileName);
|
|
1472
|
+
for (const rootDir of rootDirs) {
|
|
1473
|
+
const rel = relative(compilerHost.getCanonicalFileName(rootDir), filePath);
|
|
1474
|
+
if (!rel.startsWith("..")) {
|
|
1475
|
+
return rel;
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
return null;
|
|
1479
|
+
}
|
|
1448
1480
|
|
|
1449
|
-
// bazel-out/
|
|
1481
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/core.mjs
|
|
1450
1482
|
var NoopImportRewriter = class {
|
|
1451
1483
|
rewriteSymbol(symbol, specifier) {
|
|
1452
1484
|
return symbol;
|
|
@@ -1454,6 +1486,9 @@ var NoopImportRewriter = class {
|
|
|
1454
1486
|
rewriteSpecifier(specifier, inContextOfFile) {
|
|
1455
1487
|
return specifier;
|
|
1456
1488
|
}
|
|
1489
|
+
rewriteNamespaceImportIdentifier(specifier) {
|
|
1490
|
+
return specifier;
|
|
1491
|
+
}
|
|
1457
1492
|
};
|
|
1458
1493
|
var CORE_SUPPORTED_SYMBOLS = /* @__PURE__ */ new Map([
|
|
1459
1494
|
["\u0275\u0275defineInjectable", "\u0275\u0275defineInjectable"],
|
|
@@ -1472,6 +1507,7 @@ var CORE_SUPPORTED_SYMBOLS = /* @__PURE__ */ new Map([
|
|
|
1472
1507
|
]);
|
|
1473
1508
|
var CORE_MODULE = "@angular/core";
|
|
1474
1509
|
var R3SymbolsImportRewriter = class {
|
|
1510
|
+
r3SymbolsPath;
|
|
1475
1511
|
constructor(r3SymbolsPath) {
|
|
1476
1512
|
this.r3SymbolsPath = r3SymbolsPath;
|
|
1477
1513
|
}
|
|
@@ -1491,6 +1527,9 @@ var R3SymbolsImportRewriter = class {
|
|
|
1491
1527
|
}
|
|
1492
1528
|
return relativePathToR3Symbols;
|
|
1493
1529
|
}
|
|
1530
|
+
rewriteNamespaceImportIdentifier(specifier) {
|
|
1531
|
+
return specifier;
|
|
1532
|
+
}
|
|
1494
1533
|
};
|
|
1495
1534
|
function validateAndRewriteCoreSymbol(name) {
|
|
1496
1535
|
if (!CORE_SUPPORTED_SYMBOLS.has(name)) {
|
|
@@ -1499,7 +1538,7 @@ function validateAndRewriteCoreSymbol(name) {
|
|
|
1499
1538
|
return CORE_SUPPORTED_SYMBOLS.get(name);
|
|
1500
1539
|
}
|
|
1501
1540
|
|
|
1502
|
-
// bazel-out/
|
|
1541
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/patch_alias_reference_resolution.mjs
|
|
1503
1542
|
import ts8 from "typescript";
|
|
1504
1543
|
var patchedReferencedAliasesSymbol = Symbol("patchedReferencedAliases");
|
|
1505
1544
|
function loadIsReferencedAliasDeclarationPatch(context) {
|
|
@@ -1534,7 +1573,7 @@ function throwIncompatibleTransformationContextError() {
|
|
|
1534
1573
|
throw Error("Angular compiler is incompatible with this version of the TypeScript compiler.\n\nIf you recently updated TypeScript and this issue surfaces now, consider downgrading.\n\nPlease report an issue on the Angular repositories when this issue surfaces and you are using a supposedly compatible TypeScript version.");
|
|
1535
1574
|
}
|
|
1536
1575
|
|
|
1537
|
-
// bazel-out/
|
|
1576
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/default.mjs
|
|
1538
1577
|
var DefaultImportDeclaration = Symbol("DefaultImportDeclaration");
|
|
1539
1578
|
function attachDefaultImportDeclaration(expr, importDecl) {
|
|
1540
1579
|
expr[DefaultImportDeclaration] = importDecl;
|
|
@@ -1544,9 +1583,7 @@ function getDefaultImportDeclaration(expr) {
|
|
|
1544
1583
|
return (_a = expr[DefaultImportDeclaration]) != null ? _a : null;
|
|
1545
1584
|
}
|
|
1546
1585
|
var DefaultImportTracker = class {
|
|
1547
|
-
|
|
1548
|
-
this.sourceFileToUsedImports = /* @__PURE__ */ new Map();
|
|
1549
|
-
}
|
|
1586
|
+
sourceFileToUsedImports = /* @__PURE__ */ new Map();
|
|
1550
1587
|
recordUsedImport(importDecl) {
|
|
1551
1588
|
if (importDecl.importClause) {
|
|
1552
1589
|
const sf = getSourceFile(importDecl);
|
|
@@ -1575,15 +1612,17 @@ var DefaultImportTracker = class {
|
|
|
1575
1612
|
}
|
|
1576
1613
|
};
|
|
1577
1614
|
|
|
1578
|
-
// bazel-out/
|
|
1615
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/deferred_symbol_tracker.mjs
|
|
1579
1616
|
import ts9 from "typescript";
|
|
1580
1617
|
var AssumeEager = "AssumeEager";
|
|
1581
1618
|
var DeferredSymbolTracker = class {
|
|
1619
|
+
typeChecker;
|
|
1620
|
+
onlyExplicitDeferDependencyImports;
|
|
1621
|
+
imports = /* @__PURE__ */ new Map();
|
|
1622
|
+
explicitlyDeferredImports = /* @__PURE__ */ new Map();
|
|
1582
1623
|
constructor(typeChecker, onlyExplicitDeferDependencyImports) {
|
|
1583
1624
|
this.typeChecker = typeChecker;
|
|
1584
1625
|
this.onlyExplicitDeferDependencyImports = onlyExplicitDeferDependencyImports;
|
|
1585
|
-
this.imports = /* @__PURE__ */ new Map();
|
|
1586
|
-
this.explicitlyDeferredImports = /* @__PURE__ */ new Map();
|
|
1587
1626
|
}
|
|
1588
1627
|
extractImportedSymbols(importDecl) {
|
|
1589
1628
|
const symbolMap = /* @__PURE__ */ new Map();
|
|
@@ -1696,13 +1735,11 @@ var DeferredSymbolTracker = class {
|
|
|
1696
1735
|
}
|
|
1697
1736
|
};
|
|
1698
1737
|
|
|
1699
|
-
// bazel-out/
|
|
1738
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/imported_symbols_tracker.mjs
|
|
1700
1739
|
import ts10 from "typescript";
|
|
1701
1740
|
var ImportedSymbolsTracker = class {
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
this.fileToNamespaceImports = /* @__PURE__ */ new WeakMap();
|
|
1705
|
-
}
|
|
1741
|
+
fileToNamedImports = /* @__PURE__ */ new WeakMap();
|
|
1742
|
+
fileToNamespaceImports = /* @__PURE__ */ new WeakMap();
|
|
1706
1743
|
isPotentialReferenceToNamedImport(node, exportedName, moduleName) {
|
|
1707
1744
|
const sourceFile = node.getSourceFile();
|
|
1708
1745
|
this.scanImports(sourceFile);
|
|
@@ -1766,14 +1803,15 @@ var ImportedSymbolsTracker = class {
|
|
|
1766
1803
|
}
|
|
1767
1804
|
};
|
|
1768
1805
|
|
|
1769
|
-
// bazel-out/
|
|
1806
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/local_compilation_extra_imports_tracker.mjs
|
|
1770
1807
|
import ts11 from "typescript";
|
|
1771
1808
|
var LocalCompilationExtraImportsTracker = class {
|
|
1809
|
+
typeChecker;
|
|
1810
|
+
localImportsMap = /* @__PURE__ */ new Map();
|
|
1811
|
+
globalImportsSet = /* @__PURE__ */ new Set();
|
|
1812
|
+
markedFilesSet = /* @__PURE__ */ new Set();
|
|
1772
1813
|
constructor(typeChecker) {
|
|
1773
1814
|
this.typeChecker = typeChecker;
|
|
1774
|
-
this.localImportsMap = /* @__PURE__ */ new Map();
|
|
1775
|
-
this.globalImportsSet = /* @__PURE__ */ new Set();
|
|
1776
|
-
this.markedFilesSet = /* @__PURE__ */ new Set();
|
|
1777
1815
|
}
|
|
1778
1816
|
markFileForExtraImportGeneration(sf) {
|
|
1779
1817
|
this.markedFilesSet.add(sf.fileName);
|
|
@@ -1817,8 +1855,12 @@ function removeQuotations(s) {
|
|
|
1817
1855
|
return s.substring(1, s.length - 1).trim();
|
|
1818
1856
|
}
|
|
1819
1857
|
|
|
1820
|
-
// bazel-out/
|
|
1858
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/resolver.mjs
|
|
1821
1859
|
var ModuleResolver = class {
|
|
1860
|
+
program;
|
|
1861
|
+
compilerOptions;
|
|
1862
|
+
host;
|
|
1863
|
+
moduleResolutionCache;
|
|
1822
1864
|
constructor(program, compilerOptions, host, moduleResolutionCache) {
|
|
1823
1865
|
this.program = program;
|
|
1824
1866
|
this.compilerOptions = compilerOptions;
|
|
@@ -1834,10 +1876,10 @@ var ModuleResolver = class {
|
|
|
1834
1876
|
}
|
|
1835
1877
|
};
|
|
1836
1878
|
|
|
1837
|
-
// bazel-out/
|
|
1879
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/import_manager/import_manager.mjs
|
|
1838
1880
|
import ts16 from "typescript";
|
|
1839
1881
|
|
|
1840
|
-
// bazel-out/
|
|
1882
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/import_manager/check_unique_identifier_name.mjs
|
|
1841
1883
|
import ts12 from "typescript";
|
|
1842
1884
|
function createGenerateUniqueIdentifierHelper() {
|
|
1843
1885
|
const generatedIdentifiers = /* @__PURE__ */ new Set();
|
|
@@ -1863,7 +1905,7 @@ function createGenerateUniqueIdentifierHelper() {
|
|
|
1863
1905
|
};
|
|
1864
1906
|
}
|
|
1865
1907
|
|
|
1866
|
-
// bazel-out/
|
|
1908
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/import_manager/import_typescript_transform.mjs
|
|
1867
1909
|
import ts13 from "typescript";
|
|
1868
1910
|
function createTsTransformForImportManager(manager, extraStatementsForFiles) {
|
|
1869
1911
|
return (ctx) => {
|
|
@@ -1930,7 +1972,7 @@ function isImportStatement(stmt) {
|
|
|
1930
1972
|
return ts13.isImportDeclaration(stmt) || ts13.isImportEqualsDeclaration(stmt) || ts13.isNamespaceImport(stmt);
|
|
1931
1973
|
}
|
|
1932
1974
|
|
|
1933
|
-
// bazel-out/
|
|
1975
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/import_manager/reuse_generated_imports.mjs
|
|
1934
1976
|
import ts14 from "typescript";
|
|
1935
1977
|
function attemptToReuseGeneratedImports(tracker, request) {
|
|
1936
1978
|
const requestHash = hashImportRequest(request);
|
|
@@ -1957,7 +1999,7 @@ function hashImportRequest(req) {
|
|
|
1957
1999
|
return `${req.requestedFile.fileName}:${req.exportModuleSpecifier}:${req.exportSymbolName}${req.unsafeAliasOverride ? ":" + req.unsafeAliasOverride : ""}`;
|
|
1958
2000
|
}
|
|
1959
2001
|
|
|
1960
|
-
// bazel-out/
|
|
2002
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/import_manager/reuse_source_file_imports.mjs
|
|
1961
2003
|
import ts15 from "typescript";
|
|
1962
2004
|
function attemptToReuseExistingSourceFileImports(tracker, sourceFile, request) {
|
|
1963
2005
|
let candidateImportToBeUpdated = null;
|
|
@@ -2017,21 +2059,23 @@ function attemptToReuseExistingSourceFileImports(tracker, sourceFile, request) {
|
|
|
2017
2059
|
return fileUniqueAlias != null ? fileUniqueAlias : propertyName;
|
|
2018
2060
|
}
|
|
2019
2061
|
|
|
2020
|
-
// bazel-out/
|
|
2062
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/import_manager/import_manager.mjs
|
|
2021
2063
|
var presetImportManagerForceNamespaceImports = {
|
|
2022
2064
|
disableOriginalSourceFileReuse: true,
|
|
2023
2065
|
forceGenerateNamespacesForNewImports: true
|
|
2024
2066
|
};
|
|
2025
2067
|
var ImportManager = class {
|
|
2068
|
+
newImports = /* @__PURE__ */ new Map();
|
|
2069
|
+
removedImports = /* @__PURE__ */ new Map();
|
|
2070
|
+
nextUniqueIndex = 0;
|
|
2071
|
+
config;
|
|
2072
|
+
reuseSourceFileImportsTracker;
|
|
2073
|
+
reuseGeneratedImportsTracker = {
|
|
2074
|
+
directReuseCache: /* @__PURE__ */ new Map(),
|
|
2075
|
+
namespaceImportReuseCache: /* @__PURE__ */ new Map()
|
|
2076
|
+
};
|
|
2026
2077
|
constructor(config = {}) {
|
|
2027
2078
|
var _a, _b, _c, _d, _e, _f;
|
|
2028
|
-
this.newImports = /* @__PURE__ */ new Map();
|
|
2029
|
-
this.removedImports = /* @__PURE__ */ new Map();
|
|
2030
|
-
this.nextUniqueIndex = 0;
|
|
2031
|
-
this.reuseGeneratedImportsTracker = {
|
|
2032
|
-
directReuseCache: /* @__PURE__ */ new Map(),
|
|
2033
|
-
namespaceImportReuseCache: /* @__PURE__ */ new Map()
|
|
2034
|
-
};
|
|
2035
2079
|
this.config = {
|
|
2036
2080
|
shouldUseSingleQuotes: (_a = config.shouldUseSingleQuotes) != null ? _a : () => false,
|
|
2037
2081
|
rewriter: (_b = config.rewriter) != null ? _b : null,
|
|
@@ -2097,7 +2141,10 @@ var ImportManager = class {
|
|
|
2097
2141
|
}
|
|
2098
2142
|
const { namedImports, namespaceImports } = this._getNewImportsTrackerForFile(sourceFile);
|
|
2099
2143
|
if (request.exportSymbolName === null || forceGenerateNamespacesForNewImports) {
|
|
2100
|
-
|
|
2144
|
+
let namespaceImportName = `${this.config.namespaceImportPrefix}${this.nextUniqueIndex++}`;
|
|
2145
|
+
if (this.config.rewriter) {
|
|
2146
|
+
namespaceImportName = this.config.rewriter.rewriteNamespaceImportIdentifier(namespaceImportName, request.exportModuleSpecifier);
|
|
2147
|
+
}
|
|
2101
2148
|
const namespaceImport2 = ts16.factory.createNamespaceImport((_a = this.config.generateUniqueIdentifier(sourceFile, namespaceImportName)) != null ? _a : ts16.factory.createIdentifier(namespaceImportName));
|
|
2102
2149
|
namespaceImports.set(request.exportModuleSpecifier, namespaceImport2);
|
|
2103
2150
|
captureGeneratedImport({ ...request, exportSymbolName: null }, this.reuseGeneratedImportsTracker, namespaceImport2.name);
|
|
@@ -2235,8 +2282,9 @@ function createImportReference(asTypeReference, ref) {
|
|
|
2235
2282
|
}
|
|
2236
2283
|
}
|
|
2237
2284
|
|
|
2238
|
-
// bazel-out/
|
|
2285
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/context.mjs
|
|
2239
2286
|
var Context = class {
|
|
2287
|
+
isStatement;
|
|
2240
2288
|
constructor(isStatement) {
|
|
2241
2289
|
this.isStatement = isStatement;
|
|
2242
2290
|
}
|
|
@@ -2248,7 +2296,7 @@ var Context = class {
|
|
|
2248
2296
|
}
|
|
2249
2297
|
};
|
|
2250
2298
|
|
|
2251
|
-
// bazel-out/
|
|
2299
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/translator.mjs
|
|
2252
2300
|
import * as o from "@angular/compiler";
|
|
2253
2301
|
var UNARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
2254
2302
|
[o.UnaryOperator.Minus, "-"],
|
|
@@ -2275,6 +2323,12 @@ var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
|
2275
2323
|
[o.BinaryOperator.NullishCoalesce, "??"]
|
|
2276
2324
|
]);
|
|
2277
2325
|
var ExpressionTranslatorVisitor = class {
|
|
2326
|
+
factory;
|
|
2327
|
+
imports;
|
|
2328
|
+
contextFile;
|
|
2329
|
+
downlevelTaggedTemplates;
|
|
2330
|
+
downlevelVariableDeclarations;
|
|
2331
|
+
recordWrappedNode;
|
|
2278
2332
|
constructor(factory, imports, contextFile, options) {
|
|
2279
2333
|
this.factory = factory;
|
|
2280
2334
|
this.imports = imports;
|
|
@@ -2408,7 +2462,11 @@ var ExpressionTranslatorVisitor = class {
|
|
|
2408
2462
|
return this.factory.createConditional(cond, ast.trueCase.visitExpression(this, context), ast.falseCase.visitExpression(this, context));
|
|
2409
2463
|
}
|
|
2410
2464
|
visitDynamicImportExpr(ast, context) {
|
|
2411
|
-
|
|
2465
|
+
const urlExpression = typeof ast.url === "string" ? this.factory.createLiteral(ast.url) : ast.url.visitExpression(this, context);
|
|
2466
|
+
if (ast.urlComment) {
|
|
2467
|
+
this.factory.attachComments(urlExpression, [o.leadingComment(ast.urlComment, true)]);
|
|
2468
|
+
}
|
|
2469
|
+
return this.factory.createDynamicImport(urlExpression);
|
|
2412
2470
|
}
|
|
2413
2471
|
visitNotExpr(ast, context) {
|
|
2414
2472
|
return this.factory.createUnaryExpression("!", ast.condition.visitExpression(this, context));
|
|
@@ -2494,7 +2552,7 @@ function createRange(span) {
|
|
|
2494
2552
|
};
|
|
2495
2553
|
}
|
|
2496
2554
|
|
|
2497
|
-
// bazel-out/
|
|
2555
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/type_emitter.mjs
|
|
2498
2556
|
import ts17 from "typescript";
|
|
2499
2557
|
var INELIGIBLE = {};
|
|
2500
2558
|
function canEmitType(type, canEmit) {
|
|
@@ -2520,6 +2578,7 @@ function canEmitType(type, canEmit) {
|
|
|
2520
2578
|
}
|
|
2521
2579
|
}
|
|
2522
2580
|
var TypeEmitter = class {
|
|
2581
|
+
translator;
|
|
2523
2582
|
constructor(translator) {
|
|
2524
2583
|
this.translator = translator;
|
|
2525
2584
|
}
|
|
@@ -2569,11 +2628,11 @@ var TypeEmitter = class {
|
|
|
2569
2628
|
}
|
|
2570
2629
|
};
|
|
2571
2630
|
|
|
2572
|
-
// bazel-out/
|
|
2631
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/type_translator.mjs
|
|
2573
2632
|
import * as o2 from "@angular/compiler";
|
|
2574
2633
|
import ts19 from "typescript";
|
|
2575
2634
|
|
|
2576
|
-
// bazel-out/
|
|
2635
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/ts_util.mjs
|
|
2577
2636
|
import ts18 from "typescript";
|
|
2578
2637
|
function tsNumericExpression(value) {
|
|
2579
2638
|
if (value < 0) {
|
|
@@ -2583,11 +2642,15 @@ function tsNumericExpression(value) {
|
|
|
2583
2642
|
return ts18.factory.createNumericLiteral(value);
|
|
2584
2643
|
}
|
|
2585
2644
|
|
|
2586
|
-
// bazel-out/
|
|
2645
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/type_translator.mjs
|
|
2587
2646
|
function translateType(type, contextFile, reflector, refEmitter, imports) {
|
|
2588
2647
|
return type.visitType(new TypeTranslatorVisitor(imports, contextFile, reflector, refEmitter), new Context(false));
|
|
2589
2648
|
}
|
|
2590
2649
|
var TypeTranslatorVisitor = class {
|
|
2650
|
+
imports;
|
|
2651
|
+
contextFile;
|
|
2652
|
+
reflector;
|
|
2653
|
+
refEmitter;
|
|
2591
2654
|
constructor(imports, contextFile, reflector, refEmitter) {
|
|
2592
2655
|
this.imports = imports;
|
|
2593
2656
|
this.contextFile = contextFile;
|
|
@@ -2800,7 +2863,7 @@ var TypeTranslatorVisitor = class {
|
|
|
2800
2863
|
}
|
|
2801
2864
|
};
|
|
2802
2865
|
|
|
2803
|
-
// bazel-out/
|
|
2866
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.mjs
|
|
2804
2867
|
import ts20 from "typescript";
|
|
2805
2868
|
var PureAnnotation;
|
|
2806
2869
|
(function(PureAnnotation2) {
|
|
@@ -2838,19 +2901,13 @@ var VAR_TYPES = {
|
|
|
2838
2901
|
"var": ts20.NodeFlags.None
|
|
2839
2902
|
};
|
|
2840
2903
|
var TypeScriptAstFactory = class {
|
|
2904
|
+
annotateForClosureCompiler;
|
|
2905
|
+
externalSourceFiles = /* @__PURE__ */ new Map();
|
|
2841
2906
|
constructor(annotateForClosureCompiler) {
|
|
2842
2907
|
this.annotateForClosureCompiler = annotateForClosureCompiler;
|
|
2843
|
-
this.externalSourceFiles = /* @__PURE__ */ new Map();
|
|
2844
|
-
this.attachComments = attachComments;
|
|
2845
|
-
this.createArrayLiteral = ts20.factory.createArrayLiteralExpression;
|
|
2846
|
-
this.createElementAccess = ts20.factory.createElementAccessExpression;
|
|
2847
|
-
this.createExpressionStatement = ts20.factory.createExpressionStatement;
|
|
2848
|
-
this.createIdentifier = ts20.factory.createIdentifier;
|
|
2849
|
-
this.createParenthesizedExpression = ts20.factory.createParenthesizedExpression;
|
|
2850
|
-
this.createPropertyAccess = ts20.factory.createPropertyAccessExpression;
|
|
2851
|
-
this.createThrowStatement = ts20.factory.createThrowStatement;
|
|
2852
|
-
this.createTypeOfExpression = ts20.factory.createTypeOfExpression;
|
|
2853
2908
|
}
|
|
2909
|
+
attachComments = attachComments;
|
|
2910
|
+
createArrayLiteral = ts20.factory.createArrayLiteralExpression;
|
|
2854
2911
|
createAssignment(target, value) {
|
|
2855
2912
|
return ts20.factory.createBinaryExpression(target, ts20.SyntaxKind.EqualsToken, value);
|
|
2856
2913
|
}
|
|
@@ -2875,11 +2932,13 @@ var TypeScriptAstFactory = class {
|
|
|
2875
2932
|
createConditional(condition, whenTrue, whenFalse) {
|
|
2876
2933
|
return ts20.factory.createConditionalExpression(condition, void 0, whenTrue, void 0, whenFalse);
|
|
2877
2934
|
}
|
|
2935
|
+
createElementAccess = ts20.factory.createElementAccessExpression;
|
|
2936
|
+
createExpressionStatement = ts20.factory.createExpressionStatement;
|
|
2878
2937
|
createDynamicImport(url) {
|
|
2879
2938
|
return ts20.factory.createCallExpression(
|
|
2880
2939
|
ts20.factory.createToken(ts20.SyntaxKind.ImportKeyword),
|
|
2881
2940
|
void 0,
|
|
2882
|
-
[ts20.factory.createStringLiteral(url)]
|
|
2941
|
+
[typeof url === "string" ? ts20.factory.createStringLiteral(url) : url]
|
|
2883
2942
|
);
|
|
2884
2943
|
}
|
|
2885
2944
|
createFunctionDeclaration(functionName, parameters, body) {
|
|
@@ -2900,6 +2959,7 @@ var TypeScriptAstFactory = class {
|
|
|
2900
2959
|
}
|
|
2901
2960
|
return ts20.factory.createArrowFunction(void 0, void 0, parameters.map((param) => ts20.factory.createParameterDeclaration(void 0, void 0, param)), void 0, void 0, body);
|
|
2902
2961
|
}
|
|
2962
|
+
createIdentifier = ts20.factory.createIdentifier;
|
|
2903
2963
|
createIfStatement(condition, thenStatement, elseStatement) {
|
|
2904
2964
|
return ts20.factory.createIfStatement(condition, thenStatement, elseStatement != null ? elseStatement : void 0);
|
|
2905
2965
|
}
|
|
@@ -2922,6 +2982,8 @@ var TypeScriptAstFactory = class {
|
|
|
2922
2982
|
createObjectLiteral(properties) {
|
|
2923
2983
|
return ts20.factory.createObjectLiteralExpression(properties.map((prop) => ts20.factory.createPropertyAssignment(prop.quoted ? ts20.factory.createStringLiteral(prop.propertyName) : ts20.factory.createIdentifier(prop.propertyName), prop.value)));
|
|
2924
2984
|
}
|
|
2985
|
+
createParenthesizedExpression = ts20.factory.createParenthesizedExpression;
|
|
2986
|
+
createPropertyAccess = ts20.factory.createPropertyAccessExpression;
|
|
2925
2987
|
createReturnStatement(expression) {
|
|
2926
2988
|
return ts20.factory.createReturnStatement(expression != null ? expression : void 0);
|
|
2927
2989
|
}
|
|
@@ -2955,6 +3017,8 @@ var TypeScriptAstFactory = class {
|
|
|
2955
3017
|
}
|
|
2956
3018
|
return ts20.factory.createTaggedTemplateExpression(tag, void 0, templateLiteral);
|
|
2957
3019
|
}
|
|
3020
|
+
createThrowStatement = ts20.factory.createThrowStatement;
|
|
3021
|
+
createTypeOfExpression = ts20.factory.createTypeOfExpression;
|
|
2958
3022
|
createUnaryExpression(operator, operand) {
|
|
2959
3023
|
return ts20.factory.createPrefixUnaryExpression(UNARY_OPERATORS2[operator], operand);
|
|
2960
3024
|
}
|
|
@@ -3003,7 +3067,7 @@ function attachComments(statement, leadingComments) {
|
|
|
3003
3067
|
}
|
|
3004
3068
|
}
|
|
3005
3069
|
|
|
3006
|
-
// bazel-out/
|
|
3070
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/typescript_translator.mjs
|
|
3007
3071
|
function translateExpression(contextFile, expression, imports, options = {}) {
|
|
3008
3072
|
return expression.visitExpression(new ExpressionTranslatorVisitor(new TypeScriptAstFactory(options.annotateForClosureCompiler === true), imports, contextFile, options), new Context(false));
|
|
3009
3073
|
}
|
|
@@ -3052,6 +3116,7 @@ export {
|
|
|
3052
3116
|
AliasStrategy,
|
|
3053
3117
|
relativePathBetween,
|
|
3054
3118
|
normalizeSeparators,
|
|
3119
|
+
getProjectRelativePath,
|
|
3055
3120
|
NoopImportRewriter,
|
|
3056
3121
|
R3SymbolsImportRewriter,
|
|
3057
3122
|
loadIsReferencedAliasDeclarationPatch,
|
|
@@ -3100,4 +3165,4 @@ export {
|
|
|
3100
3165
|
* Use of this source code is governed by an MIT-style license that can be
|
|
3101
3166
|
* found in the LICENSE file at https://angular.dev/license
|
|
3102
3167
|
*/
|
|
3103
|
-
//# sourceMappingURL=chunk-
|
|
3168
|
+
//# sourceMappingURL=chunk-TRCFFQ47.js.map
|