@angular/compiler-cli 13.2.0-next.0 → 13.2.0-rc.1
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-GX2C4BSM.js → chunk-3XJZ4ZZZ.js} +801 -1044
- package/bundles/chunk-3XJZ4ZZZ.js.map +6 -0
- package/bundles/{chunk-UAY4RXGC.js → chunk-4QCYPOMC.js} +61 -63
- package/bundles/chunk-4QCYPOMC.js.map +6 -0
- package/bundles/{chunk-TI3THPMZ.js → chunk-676MI6WZ.js} +39 -60
- package/bundles/chunk-676MI6WZ.js.map +6 -0
- package/bundles/{chunk-5QEO6HSG.js → chunk-7PY7XEFH.js} +9 -9
- package/bundles/chunk-7PY7XEFH.js.map +6 -0
- package/bundles/{chunk-GZLU7SCP.js → chunk-A5PL3TE6.js} +9 -9
- package/bundles/chunk-A5PL3TE6.js.map +6 -0
- package/bundles/{chunk-PF3ZPGF5.js → chunk-ADHVDA4A.js} +12 -12
- package/bundles/{chunk-PF3ZPGF5.js.map → chunk-ADHVDA4A.js.map} +1 -1
- package/bundles/{chunk-P2Q3CTKO.js → chunk-DH7A3OBN.js} +16 -20
- package/bundles/chunk-DH7A3OBN.js.map +6 -0
- package/bundles/{chunk-J6CW3T62.js → chunk-GLCRIILX.js} +5 -5
- package/bundles/{chunk-J6CW3T62.js.map → chunk-GLCRIILX.js.map} +0 -0
- package/bundles/{chunk-FUXNWM54.js → chunk-LMCFGUUV.js} +772 -438
- package/bundles/chunk-LMCFGUUV.js.map +6 -0
- package/bundles/{chunk-QFB4WK55.js → chunk-O4XVCXRT.js} +4 -4
- package/bundles/{chunk-QFB4WK55.js.map → chunk-O4XVCXRT.js.map} +0 -0
- package/bundles/{chunk-BXWQHEIB.js → chunk-OOEI5KQH.js} +221 -176
- package/bundles/chunk-OOEI5KQH.js.map +6 -0
- package/bundles/{chunk-C2DR5MYL.js → chunk-QBU7RUKB.js} +270 -100
- package/bundles/chunk-QBU7RUKB.js.map +6 -0
- package/bundles/{chunk-BPCUCINV.js → chunk-QDWL7SZJ.js} +2 -2
- package/bundles/{chunk-BPCUCINV.js.map → chunk-QDWL7SZJ.js.map} +0 -0
- package/bundles/{chunk-JTYUTYS2.js → chunk-SKBLJA43.js} +3 -3
- package/bundles/{chunk-JTYUTYS2.js.map → chunk-SKBLJA43.js.map} +0 -0
- package/bundles/{chunk-5NGMSHHH.js → chunk-UESD6FVI.js} +39 -41
- package/bundles/chunk-UESD6FVI.js.map +6 -0
- package/bundles/{chunk-XA5IZLLC.js → chunk-WQ3TNYTD.js} +6 -6
- package/bundles/{chunk-XA5IZLLC.js.map → chunk-WQ3TNYTD.js.map} +0 -0
- package/bundles/index.js +16 -15
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +85 -85
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +5 -5
- package/bundles/ngcc/index.js +13 -13
- package/bundles/ngcc/main-ngcc.js +14 -14
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +14 -14
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +5 -5
- package/bundles/private/bazel.js +2 -2
- package/bundles/private/localize.js +4 -4
- package/bundles/private/migrations.js +6 -6
- package/bundles/private/tooling.js +3 -3
- package/bundles/src/bin/ng_xi18n.js +11 -11
- package/bundles/src/bin/ngc.js +11 -11
- package/bundles/src/bin/ngc.js.map +1 -1
- package/bundles_metadata.json +1 -1
- package/index.d.ts +2 -0
- package/ngcc/src/packages/adjust_cjs_umd_exports.d.ts +17 -0
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/ngcc/src/packages/source_file_cache.d.ts +2 -1
- package/package.json +2 -2
- package/src/ngtsc/annotations/src/component.d.ts +2 -1
- package/src/ngtsc/annotations/src/util.d.ts +1 -1
- package/src/ngtsc/core/api/src/options.d.ts +3 -2
- package/src/ngtsc/core/api/src/public_options.d.ts +38 -0
- package/src/ngtsc/core/src/host.d.ts +1 -1
- package/src/ngtsc/diagnostics/index.d.ts +2 -1
- package/src/ngtsc/diagnostics/src/error.d.ts +1 -0
- package/src/ngtsc/diagnostics/src/error_code.d.ts +7 -0
- package/src/ngtsc/diagnostics/src/error_details_base_url.d.ts +1 -1
- package/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.d.ts +21 -0
- package/src/ngtsc/file_system/src/compiler_host.d.ts +1 -0
- package/src/ngtsc/imports/index.d.ts +1 -1
- package/src/ngtsc/imports/src/emitter.d.ts +40 -8
- package/src/ngtsc/program_driver/src/ts_create_program_driver.d.ts +1 -1
- package/src/ngtsc/translator/src/translator.d.ts +0 -5
- package/src/ngtsc/translator/src/type_translator.d.ts +0 -2
- package/src/ngtsc/typecheck/extended/api/api.d.ts +30 -10
- package/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.d.ts +3 -14
- package/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.d.ts +3 -15
- package/src/ngtsc/typecheck/extended/index.d.ts +3 -0
- package/src/ngtsc/typecheck/extended/src/extended_template_checker.d.ts +5 -4
- package/src/ngtsc/typecheck/src/environment.d.ts +3 -1
- package/src/ngtsc/typecheck/src/tcb_util.d.ts +10 -2
- package/src/ngtsc/typecheck/src/type_constructor.d.ts +3 -2
- package/src/ngtsc/typecheck/src/type_emitter.d.ts +7 -21
- package/src/ngtsc/typecheck/src/type_parameter_emitter.d.ts +2 -2
- package/src/ngtsc/util/src/typescript.d.ts +0 -5
- package/bundles/chunk-5NGMSHHH.js.map +0 -6
- package/bundles/chunk-5QEO6HSG.js.map +0 -6
- package/bundles/chunk-BXWQHEIB.js.map +0 -6
- package/bundles/chunk-C2DR5MYL.js.map +0 -6
- package/bundles/chunk-FUXNWM54.js.map +0 -6
- package/bundles/chunk-GX2C4BSM.js.map +0 -6
- package/bundles/chunk-GZLU7SCP.js.map +0 -6
- package/bundles/chunk-P2Q3CTKO.js.map +0 -6
- package/bundles/chunk-TI3THPMZ.js.map +0 -6
- package/bundles/chunk-UAY4RXGC.js.map +0 -6
|
@@ -13,9 +13,9 @@ import {
|
|
|
13
13
|
resolve,
|
|
14
14
|
stripExtension,
|
|
15
15
|
toRelativeImport
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-676MI6WZ.js";
|
|
17
17
|
|
|
18
|
-
// bazel-out/
|
|
18
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/typescript.mjs
|
|
19
19
|
import ts from "typescript";
|
|
20
20
|
var TS = /\.tsx?$/i;
|
|
21
21
|
var D_TS = /\.d\.ts$/i;
|
|
@@ -114,7 +114,7 @@ function createExportSpecifier(propertyName, name, isTypeOnly = false) {
|
|
|
114
114
|
return PARSED_TS_VERSION > 4.4 ? ts.createExportSpecifier(isTypeOnly, propertyName, name) : ts.createExportSpecifier(propertyName, name);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
// bazel-out/
|
|
117
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/references.mjs
|
|
118
118
|
var Reference = class {
|
|
119
119
|
constructor(node, bestGuessOwningModule = null) {
|
|
120
120
|
this.node = node;
|
|
@@ -177,15 +177,150 @@ var Reference = class {
|
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
// bazel-out/
|
|
180
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/alias.mjs
|
|
181
181
|
import { ExternalExpr as ExternalExpr2 } from "@angular/compiler";
|
|
182
182
|
|
|
183
|
-
// bazel-out/
|
|
183
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/emitter.mjs
|
|
184
184
|
import { ExternalExpr, ExternalReference, WrappedNodeExpr } from "@angular/compiler";
|
|
185
185
|
import ts3 from "typescript";
|
|
186
186
|
|
|
187
|
-
// bazel-out/
|
|
187
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.mjs
|
|
188
|
+
var ErrorCode;
|
|
189
|
+
(function(ErrorCode2) {
|
|
190
|
+
ErrorCode2[ErrorCode2["DECORATOR_ARG_NOT_LITERAL"] = 1001] = "DECORATOR_ARG_NOT_LITERAL";
|
|
191
|
+
ErrorCode2[ErrorCode2["DECORATOR_ARITY_WRONG"] = 1002] = "DECORATOR_ARITY_WRONG";
|
|
192
|
+
ErrorCode2[ErrorCode2["DECORATOR_NOT_CALLED"] = 1003] = "DECORATOR_NOT_CALLED";
|
|
193
|
+
ErrorCode2[ErrorCode2["DECORATOR_ON_ANONYMOUS_CLASS"] = 1004] = "DECORATOR_ON_ANONYMOUS_CLASS";
|
|
194
|
+
ErrorCode2[ErrorCode2["DECORATOR_UNEXPECTED"] = 1005] = "DECORATOR_UNEXPECTED";
|
|
195
|
+
ErrorCode2[ErrorCode2["DECORATOR_COLLISION"] = 1006] = "DECORATOR_COLLISION";
|
|
196
|
+
ErrorCode2[ErrorCode2["VALUE_HAS_WRONG_TYPE"] = 1010] = "VALUE_HAS_WRONG_TYPE";
|
|
197
|
+
ErrorCode2[ErrorCode2["VALUE_NOT_LITERAL"] = 1011] = "VALUE_NOT_LITERAL";
|
|
198
|
+
ErrorCode2[ErrorCode2["COMPONENT_MISSING_TEMPLATE"] = 2001] = "COMPONENT_MISSING_TEMPLATE";
|
|
199
|
+
ErrorCode2[ErrorCode2["PIPE_MISSING_NAME"] = 2002] = "PIPE_MISSING_NAME";
|
|
200
|
+
ErrorCode2[ErrorCode2["PARAM_MISSING_TOKEN"] = 2003] = "PARAM_MISSING_TOKEN";
|
|
201
|
+
ErrorCode2[ErrorCode2["DIRECTIVE_MISSING_SELECTOR"] = 2004] = "DIRECTIVE_MISSING_SELECTOR";
|
|
202
|
+
ErrorCode2[ErrorCode2["UNDECORATED_PROVIDER"] = 2005] = "UNDECORATED_PROVIDER";
|
|
203
|
+
ErrorCode2[ErrorCode2["DIRECTIVE_INHERITS_UNDECORATED_CTOR"] = 2006] = "DIRECTIVE_INHERITS_UNDECORATED_CTOR";
|
|
204
|
+
ErrorCode2[ErrorCode2["UNDECORATED_CLASS_USING_ANGULAR_FEATURES"] = 2007] = "UNDECORATED_CLASS_USING_ANGULAR_FEATURES";
|
|
205
|
+
ErrorCode2[ErrorCode2["COMPONENT_RESOURCE_NOT_FOUND"] = 2008] = "COMPONENT_RESOURCE_NOT_FOUND";
|
|
206
|
+
ErrorCode2[ErrorCode2["COMPONENT_INVALID_SHADOW_DOM_SELECTOR"] = 2009] = "COMPONENT_INVALID_SHADOW_DOM_SELECTOR";
|
|
207
|
+
ErrorCode2[ErrorCode2["SYMBOL_NOT_EXPORTED"] = 3001] = "SYMBOL_NOT_EXPORTED";
|
|
208
|
+
ErrorCode2[ErrorCode2["SYMBOL_EXPORTED_UNDER_DIFFERENT_NAME"] = 3002] = "SYMBOL_EXPORTED_UNDER_DIFFERENT_NAME";
|
|
209
|
+
ErrorCode2[ErrorCode2["IMPORT_CYCLE_DETECTED"] = 3003] = "IMPORT_CYCLE_DETECTED";
|
|
210
|
+
ErrorCode2[ErrorCode2["IMPORT_GENERATION_FAILURE"] = 3004] = "IMPORT_GENERATION_FAILURE";
|
|
211
|
+
ErrorCode2[ErrorCode2["CONFIG_FLAT_MODULE_NO_INDEX"] = 4001] = "CONFIG_FLAT_MODULE_NO_INDEX";
|
|
212
|
+
ErrorCode2[ErrorCode2["CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK"] = 4002] = "CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK";
|
|
213
|
+
ErrorCode2[ErrorCode2["CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES"] = 4003] = "CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES";
|
|
214
|
+
ErrorCode2[ErrorCode2["CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL"] = 4004] = "CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL";
|
|
215
|
+
ErrorCode2[ErrorCode2["CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK"] = 4005] = "CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK";
|
|
216
|
+
ErrorCode2[ErrorCode2["HOST_BINDING_PARSE_ERROR"] = 5001] = "HOST_BINDING_PARSE_ERROR";
|
|
217
|
+
ErrorCode2[ErrorCode2["TEMPLATE_PARSE_ERROR"] = 5002] = "TEMPLATE_PARSE_ERROR";
|
|
218
|
+
ErrorCode2[ErrorCode2["NGMODULE_INVALID_DECLARATION"] = 6001] = "NGMODULE_INVALID_DECLARATION";
|
|
219
|
+
ErrorCode2[ErrorCode2["NGMODULE_INVALID_IMPORT"] = 6002] = "NGMODULE_INVALID_IMPORT";
|
|
220
|
+
ErrorCode2[ErrorCode2["NGMODULE_INVALID_EXPORT"] = 6003] = "NGMODULE_INVALID_EXPORT";
|
|
221
|
+
ErrorCode2[ErrorCode2["NGMODULE_INVALID_REEXPORT"] = 6004] = "NGMODULE_INVALID_REEXPORT";
|
|
222
|
+
ErrorCode2[ErrorCode2["NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC"] = 6005] = "NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC";
|
|
223
|
+
ErrorCode2[ErrorCode2["NGMODULE_REEXPORT_NAME_COLLISION"] = 6006] = "NGMODULE_REEXPORT_NAME_COLLISION";
|
|
224
|
+
ErrorCode2[ErrorCode2["NGMODULE_DECLARATION_NOT_UNIQUE"] = 6007] = "NGMODULE_DECLARATION_NOT_UNIQUE";
|
|
225
|
+
ErrorCode2[ErrorCode2["NGMODULE_VE_DEPENDENCY_ON_IVY_LIB"] = 6999] = "NGMODULE_VE_DEPENDENCY_ON_IVY_LIB";
|
|
226
|
+
ErrorCode2[ErrorCode2["SCHEMA_INVALID_ELEMENT"] = 8001] = "SCHEMA_INVALID_ELEMENT";
|
|
227
|
+
ErrorCode2[ErrorCode2["SCHEMA_INVALID_ATTRIBUTE"] = 8002] = "SCHEMA_INVALID_ATTRIBUTE";
|
|
228
|
+
ErrorCode2[ErrorCode2["MISSING_REFERENCE_TARGET"] = 8003] = "MISSING_REFERENCE_TARGET";
|
|
229
|
+
ErrorCode2[ErrorCode2["MISSING_PIPE"] = 8004] = "MISSING_PIPE";
|
|
230
|
+
ErrorCode2[ErrorCode2["WRITE_TO_READ_ONLY_VARIABLE"] = 8005] = "WRITE_TO_READ_ONLY_VARIABLE";
|
|
231
|
+
ErrorCode2[ErrorCode2["DUPLICATE_VARIABLE_DECLARATION"] = 8006] = "DUPLICATE_VARIABLE_DECLARATION";
|
|
232
|
+
ErrorCode2[ErrorCode2["SPLIT_TWO_WAY_BINDING"] = 8007] = "SPLIT_TWO_WAY_BINDING";
|
|
233
|
+
ErrorCode2[ErrorCode2["INVALID_BANANA_IN_BOX"] = 8101] = "INVALID_BANANA_IN_BOX";
|
|
234
|
+
ErrorCode2[ErrorCode2["NULLISH_COALESCING_NOT_NULLABLE"] = 8102] = "NULLISH_COALESCING_NOT_NULLABLE";
|
|
235
|
+
ErrorCode2[ErrorCode2["INLINE_TCB_REQUIRED"] = 8900] = "INLINE_TCB_REQUIRED";
|
|
236
|
+
ErrorCode2[ErrorCode2["INLINE_TYPE_CTOR_REQUIRED"] = 8901] = "INLINE_TYPE_CTOR_REQUIRED";
|
|
237
|
+
ErrorCode2[ErrorCode2["INJECTABLE_DUPLICATE_PROV"] = 9001] = "INJECTABLE_DUPLICATE_PROV";
|
|
238
|
+
ErrorCode2[ErrorCode2["SUGGEST_STRICT_TEMPLATES"] = 10001] = "SUGGEST_STRICT_TEMPLATES";
|
|
239
|
+
ErrorCode2[ErrorCode2["SUGGEST_SUBOPTIMAL_TYPE_INFERENCE"] = 10002] = "SUGGEST_SUBOPTIMAL_TYPE_INFERENCE";
|
|
240
|
+
})(ErrorCode || (ErrorCode = {}));
|
|
241
|
+
|
|
242
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/docs.mjs
|
|
243
|
+
var COMPILER_ERRORS_WITH_GUIDES = /* @__PURE__ */ new Set([
|
|
244
|
+
ErrorCode.DECORATOR_ARG_NOT_LITERAL,
|
|
245
|
+
ErrorCode.IMPORT_CYCLE_DETECTED,
|
|
246
|
+
ErrorCode.PARAM_MISSING_TOKEN,
|
|
247
|
+
ErrorCode.SCHEMA_INVALID_ELEMENT,
|
|
248
|
+
ErrorCode.SCHEMA_INVALID_ATTRIBUTE,
|
|
249
|
+
ErrorCode.MISSING_REFERENCE_TARGET,
|
|
250
|
+
ErrorCode.COMPONENT_INVALID_SHADOW_DOM_SELECTOR
|
|
251
|
+
]);
|
|
252
|
+
|
|
253
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error.mjs
|
|
188
254
|
import ts2 from "typescript";
|
|
255
|
+
|
|
256
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/util.mjs
|
|
257
|
+
var ERROR_CODE_MATCHER = /(\u001b\[\d+m ?)TS-99(\d+: ?\u001b\[\d+m)/g;
|
|
258
|
+
function replaceTsWithNgInErrors(errors) {
|
|
259
|
+
return errors.replace(ERROR_CODE_MATCHER, "$1NG$2");
|
|
260
|
+
}
|
|
261
|
+
function ngErrorCode(code) {
|
|
262
|
+
return parseInt("-99" + code);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error.mjs
|
|
266
|
+
var FatalDiagnosticError = class {
|
|
267
|
+
constructor(code, node, message, relatedInformation) {
|
|
268
|
+
this.code = code;
|
|
269
|
+
this.node = node;
|
|
270
|
+
this.message = message;
|
|
271
|
+
this.relatedInformation = relatedInformation;
|
|
272
|
+
this._isFatalDiagnosticError = true;
|
|
273
|
+
}
|
|
274
|
+
toDiagnostic() {
|
|
275
|
+
return makeDiagnostic(this.code, this.node, this.message, this.relatedInformation);
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
function makeDiagnostic(code, node, messageText, relatedInformation) {
|
|
279
|
+
node = ts2.getOriginalNode(node);
|
|
280
|
+
return {
|
|
281
|
+
category: ts2.DiagnosticCategory.Error,
|
|
282
|
+
code: ngErrorCode(code),
|
|
283
|
+
file: ts2.getOriginalNode(node).getSourceFile(),
|
|
284
|
+
start: node.getStart(void 0, false),
|
|
285
|
+
length: node.getWidth(),
|
|
286
|
+
messageText,
|
|
287
|
+
relatedInformation
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
function makeDiagnosticChain(messageText, next) {
|
|
291
|
+
return {
|
|
292
|
+
category: ts2.DiagnosticCategory.Message,
|
|
293
|
+
code: 0,
|
|
294
|
+
messageText,
|
|
295
|
+
next
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
function makeRelatedInformation(node, messageText) {
|
|
299
|
+
node = ts2.getOriginalNode(node);
|
|
300
|
+
return {
|
|
301
|
+
category: ts2.DiagnosticCategory.Message,
|
|
302
|
+
code: 0,
|
|
303
|
+
file: node.getSourceFile(),
|
|
304
|
+
start: node.getStart(),
|
|
305
|
+
length: node.getWidth(),
|
|
306
|
+
messageText
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
function isFatalDiagnosticError(err) {
|
|
310
|
+
return err._isFatalDiagnosticError === true;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.mjs
|
|
314
|
+
var ERROR_DETAILS_PAGE_BASE_URL = "https://angular.io/errors";
|
|
315
|
+
|
|
316
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.mjs
|
|
317
|
+
var ExtendedTemplateDiagnosticName;
|
|
318
|
+
(function(ExtendedTemplateDiagnosticName2) {
|
|
319
|
+
ExtendedTemplateDiagnosticName2["INVALID_BANANA_IN_BOX"] = "invalidBananaInBox";
|
|
320
|
+
ExtendedTemplateDiagnosticName2["NULLISH_COALESCING_NOT_NULLABLE"] = "nullishCoalescingNotNullable";
|
|
321
|
+
})(ExtendedTemplateDiagnosticName || (ExtendedTemplateDiagnosticName = {}));
|
|
322
|
+
|
|
323
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/find_export.mjs
|
|
189
324
|
function findExportedNameOfNode(target, file, reflector) {
|
|
190
325
|
const exports = reflector.getExportsOfModule(file);
|
|
191
326
|
if (exports === null) {
|
|
@@ -202,13 +337,10 @@ function findExportedNameOfNode(target, file, reflector) {
|
|
|
202
337
|
}
|
|
203
338
|
foundExportName = exportName;
|
|
204
339
|
}
|
|
205
|
-
if (foundExportName === null) {
|
|
206
|
-
throw new Error(`Failed to find exported name of node (${target.getText()}) in '${file.fileName}'.`);
|
|
207
|
-
}
|
|
208
340
|
return foundExportName;
|
|
209
341
|
}
|
|
210
342
|
|
|
211
|
-
// bazel-out/
|
|
343
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/emitter.mjs
|
|
212
344
|
var ImportFlags;
|
|
213
345
|
(function(ImportFlags2) {
|
|
214
346
|
ImportFlags2[ImportFlags2["None"] = 0] = "None";
|
|
@@ -216,6 +348,13 @@ var ImportFlags;
|
|
|
216
348
|
ImportFlags2[ImportFlags2["NoAliasing"] = 2] = "NoAliasing";
|
|
217
349
|
ImportFlags2[ImportFlags2["AllowTypeImports"] = 4] = "AllowTypeImports";
|
|
218
350
|
})(ImportFlags || (ImportFlags = {}));
|
|
351
|
+
function assertSuccessfulReferenceEmit(result, origin, typeKind) {
|
|
352
|
+
if (result.kind === 0) {
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
const message = makeDiagnosticChain(`Unable to import ${typeKind} ${nodeNameForError(result.ref.node)}.`, [makeDiagnosticChain(result.reason)]);
|
|
356
|
+
throw new FatalDiagnosticError(ErrorCode.IMPORT_GENERATION_FAILURE, origin, message, [makeRelatedInformation(result.ref.node, `The ${typeKind} is declared here.`)]);
|
|
357
|
+
}
|
|
219
358
|
var ReferenceEmitter = class {
|
|
220
359
|
constructor(strategies) {
|
|
221
360
|
this.strategies = strategies;
|
|
@@ -227,7 +366,12 @@ var ReferenceEmitter = class {
|
|
|
227
366
|
return emitted;
|
|
228
367
|
}
|
|
229
368
|
}
|
|
230
|
-
|
|
369
|
+
return {
|
|
370
|
+
kind: 1,
|
|
371
|
+
ref,
|
|
372
|
+
context,
|
|
373
|
+
reason: `Unable to write a reference to ${nodeNameForError(ref.node)}.`
|
|
374
|
+
};
|
|
231
375
|
}
|
|
232
376
|
};
|
|
233
377
|
var LocalIdentifierStrategy = class {
|
|
@@ -238,6 +382,7 @@ var LocalIdentifierStrategy = class {
|
|
|
238
382
|
}
|
|
239
383
|
if (!isDeclaration(ref.node) && refSf === context) {
|
|
240
384
|
return {
|
|
385
|
+
kind: 0,
|
|
241
386
|
expression: new WrappedNodeExpr(ref.node),
|
|
242
387
|
importedFile: null
|
|
243
388
|
};
|
|
@@ -245,6 +390,7 @@ var LocalIdentifierStrategy = class {
|
|
|
245
390
|
const identifier = ref.getIdentityIn(context);
|
|
246
391
|
if (identifier !== null) {
|
|
247
392
|
return {
|
|
393
|
+
kind: 0,
|
|
248
394
|
expression: new WrappedNodeExpr(identifier),
|
|
249
395
|
importedFile: null
|
|
250
396
|
};
|
|
@@ -259,7 +405,7 @@ var AbsoluteModuleStrategy = class {
|
|
|
259
405
|
this.checker = checker;
|
|
260
406
|
this.moduleResolver = moduleResolver;
|
|
261
407
|
this.reflectionHost = reflectionHost;
|
|
262
|
-
this.moduleExportsCache = new Map();
|
|
408
|
+
this.moduleExportsCache = /* @__PURE__ */ new Map();
|
|
263
409
|
}
|
|
264
410
|
emit(ref, context, importFlags) {
|
|
265
411
|
if (ref.bestGuessOwningModule === null) {
|
|
@@ -271,11 +417,24 @@ var AbsoluteModuleStrategy = class {
|
|
|
271
417
|
}
|
|
272
418
|
const { specifier, resolutionContext } = ref.bestGuessOwningModule;
|
|
273
419
|
const exports = this.getExportsOfModule(specifier, resolutionContext);
|
|
274
|
-
if (exports === null
|
|
275
|
-
|
|
420
|
+
if (exports.module === null) {
|
|
421
|
+
return {
|
|
422
|
+
kind: 1,
|
|
423
|
+
ref,
|
|
424
|
+
context,
|
|
425
|
+
reason: `The module '${specifier}' could not be found.`
|
|
426
|
+
};
|
|
427
|
+
} else if (exports.exportMap === null || !exports.exportMap.has(ref.node)) {
|
|
428
|
+
return {
|
|
429
|
+
kind: 1,
|
|
430
|
+
ref,
|
|
431
|
+
context,
|
|
432
|
+
reason: `The symbol is not exported from ${exports.module.fileName} (module '${specifier}').`
|
|
433
|
+
};
|
|
276
434
|
}
|
|
277
435
|
const symbolName = exports.exportMap.get(ref.node);
|
|
278
436
|
return {
|
|
437
|
+
kind: 0,
|
|
279
438
|
expression: new ExternalExpr(new ExternalReference(specifier, symbolName)),
|
|
280
439
|
importedFile: exports.module
|
|
281
440
|
};
|
|
@@ -289,13 +448,13 @@ var AbsoluteModuleStrategy = class {
|
|
|
289
448
|
enumerateExportsOfModule(specifier, fromFile) {
|
|
290
449
|
const entryPointFile = this.moduleResolver.resolveModule(specifier, fromFile);
|
|
291
450
|
if (entryPointFile === null) {
|
|
292
|
-
return null;
|
|
451
|
+
return { module: null, exportMap: null };
|
|
293
452
|
}
|
|
294
453
|
const exports = this.reflectionHost.getExportsOfModule(entryPointFile);
|
|
295
454
|
if (exports === null) {
|
|
296
|
-
return null;
|
|
455
|
+
return { module: entryPointFile, exportMap: null };
|
|
297
456
|
}
|
|
298
|
-
const exportMap = new Map();
|
|
457
|
+
const exportMap = /* @__PURE__ */ new Map();
|
|
299
458
|
for (const [name, declaration] of exports) {
|
|
300
459
|
if (exportMap.has(declaration.node)) {
|
|
301
460
|
const existingExport = exportMap.get(declaration.node);
|
|
@@ -317,7 +476,12 @@ var LogicalProjectStrategy = class {
|
|
|
317
476
|
const destSf = getSourceFile(ref.node);
|
|
318
477
|
const destPath = this.logicalFs.logicalPathOfSf(destSf);
|
|
319
478
|
if (destPath === null) {
|
|
320
|
-
return
|
|
479
|
+
return {
|
|
480
|
+
kind: 1,
|
|
481
|
+
ref,
|
|
482
|
+
context,
|
|
483
|
+
reason: `The file ${destSf.fileName} is outside of the configured 'rootDir'.`
|
|
484
|
+
};
|
|
321
485
|
}
|
|
322
486
|
const originPath = this.logicalFs.logicalPathOfSf(context);
|
|
323
487
|
if (originPath === null) {
|
|
@@ -328,10 +492,16 @@ var LogicalProjectStrategy = class {
|
|
|
328
492
|
}
|
|
329
493
|
const name = findExportedNameOfNode(ref.node, destSf, this.reflector);
|
|
330
494
|
if (name === null) {
|
|
331
|
-
return
|
|
495
|
+
return {
|
|
496
|
+
kind: 1,
|
|
497
|
+
ref,
|
|
498
|
+
context,
|
|
499
|
+
reason: `The symbol is not exported from ${destSf.fileName}.`
|
|
500
|
+
};
|
|
332
501
|
}
|
|
333
502
|
const moduleName = LogicalProjectPath.relativePathBetween(originPath, destPath);
|
|
334
503
|
return {
|
|
504
|
+
kind: 0,
|
|
335
505
|
expression: new ExternalExpr({ moduleName, name }),
|
|
336
506
|
importedFile: destSf
|
|
337
507
|
};
|
|
@@ -346,7 +516,19 @@ var RelativePathStrategy = class {
|
|
|
346
516
|
const relativePath = relative(dirname(absoluteFromSourceFile(context)), absoluteFromSourceFile(destSf));
|
|
347
517
|
const moduleName = toRelativeImport(stripExtension(relativePath));
|
|
348
518
|
const name = findExportedNameOfNode(ref.node, destSf, this.reflector);
|
|
349
|
-
|
|
519
|
+
if (name === null) {
|
|
520
|
+
return {
|
|
521
|
+
kind: 1,
|
|
522
|
+
ref,
|
|
523
|
+
context,
|
|
524
|
+
reason: `The symbol is not exported from ${destSf.fileName}.`
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
return {
|
|
528
|
+
kind: 0,
|
|
529
|
+
expression: new ExternalExpr({ moduleName, name }),
|
|
530
|
+
importedFile: destSf
|
|
531
|
+
};
|
|
350
532
|
}
|
|
351
533
|
};
|
|
352
534
|
var UnifiedModulesStrategy = class {
|
|
@@ -362,13 +544,14 @@ var UnifiedModulesStrategy = class {
|
|
|
362
544
|
}
|
|
363
545
|
const moduleName = this.unifiedModulesHost.fileNameToModuleName(destSf.fileName, context.fileName);
|
|
364
546
|
return {
|
|
547
|
+
kind: 0,
|
|
365
548
|
expression: new ExternalExpr({ moduleName, name }),
|
|
366
549
|
importedFile: destSf
|
|
367
550
|
};
|
|
368
551
|
}
|
|
369
552
|
};
|
|
370
553
|
|
|
371
|
-
// bazel-out/
|
|
554
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/alias.mjs
|
|
372
555
|
var CHARS_TO_ESCAPE = /[^a-zA-Z0-9/_]/g;
|
|
373
556
|
var UnifiedModulesAliasingHost = class {
|
|
374
557
|
constructor(unifiedModulesHost) {
|
|
@@ -427,11 +610,15 @@ var AliasStrategy = class {
|
|
|
427
610
|
if (importMode & ImportFlags.NoAliasing || ref.alias === null) {
|
|
428
611
|
return null;
|
|
429
612
|
}
|
|
430
|
-
return {
|
|
613
|
+
return {
|
|
614
|
+
kind: 0,
|
|
615
|
+
expression: ref.alias,
|
|
616
|
+
importedFile: "unknown"
|
|
617
|
+
};
|
|
431
618
|
}
|
|
432
619
|
};
|
|
433
620
|
|
|
434
|
-
// bazel-out/
|
|
621
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/path.mjs
|
|
435
622
|
function relativePathBetween(from, to) {
|
|
436
623
|
const relativePath = stripExtension(relative(dirname(resolve(from)), resolve(to)));
|
|
437
624
|
return relativePath !== "" ? toRelativeImport(relativePath) : null;
|
|
@@ -440,7 +627,7 @@ function normalizeSeparators(path) {
|
|
|
440
627
|
return path.replace(/\\/g, "/");
|
|
441
628
|
}
|
|
442
629
|
|
|
443
|
-
// bazel-out/
|
|
630
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/core.mjs
|
|
444
631
|
var NoopImportRewriter = class {
|
|
445
632
|
shouldImportSymbol(symbol, specifier) {
|
|
446
633
|
return true;
|
|
@@ -452,7 +639,7 @@ var NoopImportRewriter = class {
|
|
|
452
639
|
return specifier;
|
|
453
640
|
}
|
|
454
641
|
};
|
|
455
|
-
var CORE_SUPPORTED_SYMBOLS = new Map([
|
|
642
|
+
var CORE_SUPPORTED_SYMBOLS = /* @__PURE__ */ new Map([
|
|
456
643
|
["\u0275\u0275defineInjectable", "\u0275\u0275defineInjectable"],
|
|
457
644
|
["\u0275\u0275defineInjector", "\u0275\u0275defineInjector"],
|
|
458
645
|
["\u0275\u0275defineNgModule", "\u0275\u0275defineNgModule"],
|
|
@@ -498,7 +685,7 @@ function validateAndRewriteCoreSymbol(name) {
|
|
|
498
685
|
return CORE_SUPPORTED_SYMBOLS.get(name);
|
|
499
686
|
}
|
|
500
687
|
|
|
501
|
-
// bazel-out/
|
|
688
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/default.mjs
|
|
502
689
|
import ts4 from "typescript";
|
|
503
690
|
var DefaultImportDeclaration = Symbol("DefaultImportDeclaration");
|
|
504
691
|
function attachDefaultImportDeclaration(expr, importDecl) {
|
|
@@ -510,12 +697,12 @@ function getDefaultImportDeclaration(expr) {
|
|
|
510
697
|
}
|
|
511
698
|
var DefaultImportTracker = class {
|
|
512
699
|
constructor() {
|
|
513
|
-
this.sourceFileToUsedImports = new Map();
|
|
700
|
+
this.sourceFileToUsedImports = /* @__PURE__ */ new Map();
|
|
514
701
|
}
|
|
515
702
|
recordUsedImport(importDecl) {
|
|
516
703
|
const sf = getSourceFile(importDecl);
|
|
517
704
|
if (!this.sourceFileToUsedImports.has(sf)) {
|
|
518
|
-
this.sourceFileToUsedImports.set(sf, new Set());
|
|
705
|
+
this.sourceFileToUsedImports.set(sf, /* @__PURE__ */ new Set());
|
|
519
706
|
}
|
|
520
707
|
this.sourceFileToUsedImports.get(sf).add(importDecl);
|
|
521
708
|
}
|
|
@@ -543,7 +730,7 @@ var DefaultImportTracker = class {
|
|
|
543
730
|
}
|
|
544
731
|
};
|
|
545
732
|
|
|
546
|
-
// bazel-out/
|
|
733
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/resolver.mjs
|
|
547
734
|
var ModuleResolver = class {
|
|
548
735
|
constructor(program, compilerOptions, host, moduleResolutionCache) {
|
|
549
736
|
this.program = program;
|
|
@@ -560,7 +747,7 @@ var ModuleResolver = class {
|
|
|
560
747
|
}
|
|
561
748
|
};
|
|
562
749
|
|
|
563
|
-
// bazel-out/
|
|
750
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/context.mjs
|
|
564
751
|
var Context = class {
|
|
565
752
|
constructor(isStatement) {
|
|
566
753
|
this.isStatement = isStatement;
|
|
@@ -573,35 +760,30 @@ var Context = class {
|
|
|
573
760
|
}
|
|
574
761
|
};
|
|
575
762
|
|
|
576
|
-
// bazel-out/
|
|
577
|
-
import
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
UnaryOperator
|
|
582
|
-
} from "@angular/compiler";
|
|
583
|
-
var UNARY_OPERATORS = new Map([
|
|
584
|
-
[UnaryOperator.Minus, "-"],
|
|
585
|
-
[UnaryOperator.Plus, "+"]
|
|
763
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/translator.mjs
|
|
764
|
+
import * as o from "@angular/compiler";
|
|
765
|
+
var UNARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
766
|
+
[o.UnaryOperator.Minus, "-"],
|
|
767
|
+
[o.UnaryOperator.Plus, "+"]
|
|
586
768
|
]);
|
|
587
|
-
var BINARY_OPERATORS = new Map([
|
|
588
|
-
[BinaryOperator.And, "&&"],
|
|
589
|
-
[BinaryOperator.Bigger, ">"],
|
|
590
|
-
[BinaryOperator.BiggerEquals, ">="],
|
|
591
|
-
[BinaryOperator.BitwiseAnd, "&"],
|
|
592
|
-
[BinaryOperator.Divide, "/"],
|
|
593
|
-
[BinaryOperator.Equals, "=="],
|
|
594
|
-
[BinaryOperator.Identical, "==="],
|
|
595
|
-
[BinaryOperator.Lower, "<"],
|
|
596
|
-
[BinaryOperator.LowerEquals, "<="],
|
|
597
|
-
[BinaryOperator.Minus, "-"],
|
|
598
|
-
[BinaryOperator.Modulo, "%"],
|
|
599
|
-
[BinaryOperator.Multiply, "*"],
|
|
600
|
-
[BinaryOperator.NotEquals, "!="],
|
|
601
|
-
[BinaryOperator.NotIdentical, "!=="],
|
|
602
|
-
[BinaryOperator.Or, "||"],
|
|
603
|
-
[BinaryOperator.Plus, "+"],
|
|
604
|
-
[BinaryOperator.NullishCoalesce, "??"]
|
|
769
|
+
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
770
|
+
[o.BinaryOperator.And, "&&"],
|
|
771
|
+
[o.BinaryOperator.Bigger, ">"],
|
|
772
|
+
[o.BinaryOperator.BiggerEquals, ">="],
|
|
773
|
+
[o.BinaryOperator.BitwiseAnd, "&"],
|
|
774
|
+
[o.BinaryOperator.Divide, "/"],
|
|
775
|
+
[o.BinaryOperator.Equals, "=="],
|
|
776
|
+
[o.BinaryOperator.Identical, "==="],
|
|
777
|
+
[o.BinaryOperator.Lower, "<"],
|
|
778
|
+
[o.BinaryOperator.LowerEquals, "<="],
|
|
779
|
+
[o.BinaryOperator.Minus, "-"],
|
|
780
|
+
[o.BinaryOperator.Modulo, "%"],
|
|
781
|
+
[o.BinaryOperator.Multiply, "*"],
|
|
782
|
+
[o.BinaryOperator.NotEquals, "!="],
|
|
783
|
+
[o.BinaryOperator.NotIdentical, "!=="],
|
|
784
|
+
[o.BinaryOperator.Or, "||"],
|
|
785
|
+
[o.BinaryOperator.Plus, "+"],
|
|
786
|
+
[o.BinaryOperator.NullishCoalesce, "??"]
|
|
605
787
|
]);
|
|
606
788
|
var ExpressionTranslatorVisitor = class {
|
|
607
789
|
constructor(factory, imports, options) {
|
|
@@ -614,7 +796,7 @@ var ExpressionTranslatorVisitor = class {
|
|
|
614
796
|
}
|
|
615
797
|
visitDeclareVarStmt(stmt, context) {
|
|
616
798
|
var _a;
|
|
617
|
-
const varType = this.downlevelVariableDeclarations ? "var" : stmt.hasModifier(StmtModifier.Final) ? "const" : "let";
|
|
799
|
+
const varType = this.downlevelVariableDeclarations ? "var" : stmt.hasModifier(o.StmtModifier.Final) ? "const" : "let";
|
|
618
800
|
return this.attachComments(this.factory.createVariableDeclaration(stmt.name, (_a = stmt.value) == null ? void 0 : _a.visitExpression(this, context.withExpressionMode), varType), stmt.leadingComments);
|
|
619
801
|
}
|
|
620
802
|
visitDeclareFunctionStmt(stmt, context) {
|
|
@@ -626,18 +808,9 @@ var ExpressionTranslatorVisitor = class {
|
|
|
626
808
|
visitReturnStmt(stmt, context) {
|
|
627
809
|
return this.attachComments(this.factory.createReturnStatement(stmt.value.visitExpression(this, context.withExpressionMode)), stmt.leadingComments);
|
|
628
810
|
}
|
|
629
|
-
visitDeclareClassStmt(_stmt, _context) {
|
|
630
|
-
throw new Error("Method not implemented.");
|
|
631
|
-
}
|
|
632
811
|
visitIfStmt(stmt, context) {
|
|
633
812
|
return this.attachComments(this.factory.createIfStatement(stmt.condition.visitExpression(this, context), this.factory.createBlock(this.visitStatements(stmt.trueCase, context.withStatementMode)), stmt.falseCase.length > 0 ? this.factory.createBlock(this.visitStatements(stmt.falseCase, context.withStatementMode)) : null), stmt.leadingComments);
|
|
634
813
|
}
|
|
635
|
-
visitTryCatchStmt(_stmt, _context) {
|
|
636
|
-
throw new Error("Method not implemented.");
|
|
637
|
-
}
|
|
638
|
-
visitThrowStmt(stmt, context) {
|
|
639
|
-
return this.attachComments(this.factory.createThrowStatement(stmt.error.visitExpression(this, context.withExpressionMode)), stmt.leadingComments);
|
|
640
|
-
}
|
|
641
814
|
visitReadVarExpr(ast, _context) {
|
|
642
815
|
const identifier = this.factory.createIdentifier(ast.name);
|
|
643
816
|
this.setSourceMapRange(identifier, ast.sourceSpan);
|
|
@@ -725,7 +898,7 @@ var ExpressionTranslatorVisitor = class {
|
|
|
725
898
|
}
|
|
726
899
|
visitConditionalExpr(ast, context) {
|
|
727
900
|
let cond = ast.condition.visitExpression(this, context);
|
|
728
|
-
if (ast.condition instanceof ConditionalExpr) {
|
|
901
|
+
if (ast.condition instanceof o.ConditionalExpr) {
|
|
729
902
|
cond = this.factory.createParenthesizedExpression(cond);
|
|
730
903
|
}
|
|
731
904
|
return this.factory.createConditional(cond, ast.trueCase.visitExpression(this, context), ast.falseCase.visitExpression(this, context));
|
|
@@ -733,19 +906,13 @@ var ExpressionTranslatorVisitor = class {
|
|
|
733
906
|
visitNotExpr(ast, context) {
|
|
734
907
|
return this.factory.createUnaryExpression("!", ast.condition.visitExpression(this, context));
|
|
735
908
|
}
|
|
736
|
-
visitAssertNotNullExpr(ast, context) {
|
|
737
|
-
return ast.condition.visitExpression(this, context);
|
|
738
|
-
}
|
|
739
|
-
visitCastExpr(ast, context) {
|
|
740
|
-
return ast.value.visitExpression(this, context);
|
|
741
|
-
}
|
|
742
909
|
visitFunctionExpr(ast, context) {
|
|
743
910
|
var _a;
|
|
744
911
|
return this.factory.createFunctionExpression((_a = ast.name) != null ? _a : null, ast.params.map((param) => param.name), this.factory.createBlock(this.visitStatements(ast.statements, context)));
|
|
745
912
|
}
|
|
746
913
|
visitBinaryOperatorExpr(ast, context) {
|
|
747
914
|
if (!BINARY_OPERATORS.has(ast.operator)) {
|
|
748
|
-
throw new Error(`Unknown binary operator: ${BinaryOperator[ast.operator]}`);
|
|
915
|
+
throw new Error(`Unknown binary operator: ${o.BinaryOperator[ast.operator]}`);
|
|
749
916
|
}
|
|
750
917
|
return this.factory.createBinaryExpression(ast.lhs.visitExpression(this, context), BINARY_OPERATORS.get(ast.operator), ast.rhs.visitExpression(this, context));
|
|
751
918
|
}
|
|
@@ -780,7 +947,7 @@ var ExpressionTranslatorVisitor = class {
|
|
|
780
947
|
}
|
|
781
948
|
visitUnaryOperatorExpr(ast, context) {
|
|
782
949
|
if (!UNARY_OPERATORS.has(ast.operator)) {
|
|
783
|
-
throw new Error(`Unknown unary operator: ${UnaryOperator[ast.operator]}`);
|
|
950
|
+
throw new Error(`Unknown unary operator: ${o.UnaryOperator[ast.operator]}`);
|
|
784
951
|
}
|
|
785
952
|
return this.factory.createUnaryExpression(UNARY_OPERATORS.get(ast.operator), ast.expr.visitExpression(this, context));
|
|
786
953
|
}
|
|
@@ -817,13 +984,13 @@ function createRange(span) {
|
|
|
817
984
|
};
|
|
818
985
|
}
|
|
819
986
|
|
|
820
|
-
// bazel-out/
|
|
987
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/import_manager.mjs
|
|
821
988
|
import ts5 from "typescript";
|
|
822
989
|
var ImportManager = class {
|
|
823
990
|
constructor(rewriter = new NoopImportRewriter(), prefix = "i") {
|
|
824
991
|
this.rewriter = rewriter;
|
|
825
992
|
this.prefix = prefix;
|
|
826
|
-
this.specifierToIdentifier = new Map();
|
|
993
|
+
this.specifierToIdentifier = /* @__PURE__ */ new Map();
|
|
827
994
|
this.nextIndex = 0;
|
|
828
995
|
}
|
|
829
996
|
generateNamespaceImport(moduleName) {
|
|
@@ -853,10 +1020,8 @@ var ImportManager = class {
|
|
|
853
1020
|
}
|
|
854
1021
|
};
|
|
855
1022
|
|
|
856
|
-
// bazel-out/
|
|
857
|
-
import
|
|
858
|
-
BuiltinTypeName
|
|
859
|
-
} from "@angular/compiler";
|
|
1023
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/type_translator.mjs
|
|
1024
|
+
import * as o2 from "@angular/compiler";
|
|
860
1025
|
import ts6 from "typescript";
|
|
861
1026
|
function translateType(type, imports) {
|
|
862
1027
|
return type.visitType(new TypeTranslatorVisitor(imports), new Context(false));
|
|
@@ -867,19 +1032,19 @@ var TypeTranslatorVisitor = class {
|
|
|
867
1032
|
}
|
|
868
1033
|
visitBuiltinType(type, context) {
|
|
869
1034
|
switch (type.name) {
|
|
870
|
-
case BuiltinTypeName.Bool:
|
|
1035
|
+
case o2.BuiltinTypeName.Bool:
|
|
871
1036
|
return ts6.createKeywordTypeNode(ts6.SyntaxKind.BooleanKeyword);
|
|
872
|
-
case BuiltinTypeName.Dynamic:
|
|
1037
|
+
case o2.BuiltinTypeName.Dynamic:
|
|
873
1038
|
return ts6.createKeywordTypeNode(ts6.SyntaxKind.AnyKeyword);
|
|
874
|
-
case BuiltinTypeName.Int:
|
|
875
|
-
case BuiltinTypeName.Number:
|
|
1039
|
+
case o2.BuiltinTypeName.Int:
|
|
1040
|
+
case o2.BuiltinTypeName.Number:
|
|
876
1041
|
return ts6.createKeywordTypeNode(ts6.SyntaxKind.NumberKeyword);
|
|
877
|
-
case BuiltinTypeName.String:
|
|
1042
|
+
case o2.BuiltinTypeName.String:
|
|
878
1043
|
return ts6.createKeywordTypeNode(ts6.SyntaxKind.StringKeyword);
|
|
879
|
-
case BuiltinTypeName.None:
|
|
1044
|
+
case o2.BuiltinTypeName.None:
|
|
880
1045
|
return ts6.createKeywordTypeNode(ts6.SyntaxKind.NeverKeyword);
|
|
881
1046
|
default:
|
|
882
|
-
throw new Error(`Unsupported builtin type: ${BuiltinTypeName[type.name]}`);
|
|
1047
|
+
throw new Error(`Unsupported builtin type: ${o2.BuiltinTypeName[type.name]}`);
|
|
883
1048
|
}
|
|
884
1049
|
}
|
|
885
1050
|
visitExpressionType(type, context) {
|
|
@@ -960,12 +1125,6 @@ var TypeTranslatorVisitor = class {
|
|
|
960
1125
|
visitNotExpr(ast, context) {
|
|
961
1126
|
throw new Error("Method not implemented.");
|
|
962
1127
|
}
|
|
963
|
-
visitAssertNotNullExpr(ast, context) {
|
|
964
|
-
throw new Error("Method not implemented.");
|
|
965
|
-
}
|
|
966
|
-
visitCastExpr(ast, context) {
|
|
967
|
-
throw new Error("Method not implemented.");
|
|
968
|
-
}
|
|
969
1128
|
visitFunctionExpr(ast, context) {
|
|
970
1129
|
throw new Error("Method not implemented.");
|
|
971
1130
|
}
|
|
@@ -1032,7 +1191,7 @@ var TypeTranslatorVisitor = class {
|
|
|
1032
1191
|
}
|
|
1033
1192
|
};
|
|
1034
1193
|
|
|
1035
|
-
// bazel-out/
|
|
1194
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.mjs
|
|
1036
1195
|
import ts7 from "typescript";
|
|
1037
1196
|
var PureAnnotation;
|
|
1038
1197
|
(function(PureAnnotation2) {
|
|
@@ -1071,7 +1230,7 @@ var VAR_TYPES = {
|
|
|
1071
1230
|
var TypeScriptAstFactory = class {
|
|
1072
1231
|
constructor(annotateForClosureCompiler) {
|
|
1073
1232
|
this.annotateForClosureCompiler = annotateForClosureCompiler;
|
|
1074
|
-
this.externalSourceFiles = new Map();
|
|
1233
|
+
this.externalSourceFiles = /* @__PURE__ */ new Map();
|
|
1075
1234
|
this.attachComments = attachComments;
|
|
1076
1235
|
this.createArrayLiteral = ts7.createArrayLiteral;
|
|
1077
1236
|
this.createConditional = ts7.createConditional;
|
|
@@ -1204,7 +1363,7 @@ function attachComments(statement, leadingComments) {
|
|
|
1204
1363
|
}
|
|
1205
1364
|
}
|
|
1206
1365
|
|
|
1207
|
-
// bazel-out/
|
|
1366
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/typescript_translator.mjs
|
|
1208
1367
|
function translateExpression(expression, imports, options = {}) {
|
|
1209
1368
|
return expression.visitExpression(new ExpressionTranslatorVisitor(new TypeScriptAstFactory(options.annotateForClosureCompiler === true), imports, options), new Context(false));
|
|
1210
1369
|
}
|
|
@@ -1213,6 +1372,16 @@ function translateStatement(statement, imports, options = {}) {
|
|
|
1213
1372
|
}
|
|
1214
1373
|
|
|
1215
1374
|
export {
|
|
1375
|
+
ErrorCode,
|
|
1376
|
+
COMPILER_ERRORS_WITH_GUIDES,
|
|
1377
|
+
replaceTsWithNgInErrors,
|
|
1378
|
+
ngErrorCode,
|
|
1379
|
+
FatalDiagnosticError,
|
|
1380
|
+
makeDiagnostic,
|
|
1381
|
+
makeRelatedInformation,
|
|
1382
|
+
isFatalDiagnosticError,
|
|
1383
|
+
ERROR_DETAILS_PAGE_BASE_URL,
|
|
1384
|
+
ExtendedTemplateDiagnosticName,
|
|
1216
1385
|
isSymbolWithValueDeclaration,
|
|
1217
1386
|
isDtsPath,
|
|
1218
1387
|
isNonDeclarationTsPath,
|
|
@@ -1229,6 +1398,7 @@ export {
|
|
|
1229
1398
|
toUnredirectedSourceFile,
|
|
1230
1399
|
createExportSpecifier,
|
|
1231
1400
|
ImportFlags,
|
|
1401
|
+
assertSuccessfulReferenceEmit,
|
|
1232
1402
|
ReferenceEmitter,
|
|
1233
1403
|
LocalIdentifierStrategy,
|
|
1234
1404
|
AbsoluteModuleStrategy,
|
|
@@ -1262,4 +1432,4 @@ export {
|
|
|
1262
1432
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1263
1433
|
* found in the LICENSE file at https://angular.io/license
|
|
1264
1434
|
*/
|
|
1265
|
-
//# sourceMappingURL=chunk-
|
|
1435
|
+
//# sourceMappingURL=chunk-QBU7RUKB.js.map
|