@typescript-deploys/pr-build 5.0.0-pr-51492-2 → 5.0.0-pr-50996-9
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/lib/lib.es2015.core.d.ts +2 -2
- package/lib/lib.es5.d.ts +1 -1
- package/lib/tsc.js +354 -408
- package/lib/tsserver.js +1025 -786
- package/lib/tsserverlibrary.d.ts +2 -4
- package/lib/tsserverlibrary.js +1037 -788
- package/lib/typescript.d.ts +2 -4
- package/lib/typescript.js +1029 -785
- package/lib/typingsInstaller.js +149 -221
- package/package.json +1 -1
package/lib/typescript.js
CHANGED
|
@@ -42,7 +42,7 @@ var ts = (() => {
|
|
|
42
42
|
"src/compiler/corePublic.ts"() {
|
|
43
43
|
"use strict";
|
|
44
44
|
versionMajorMinor = "5.0";
|
|
45
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
45
|
+
version = `${versionMajorMinor}.0-insiders.20221123`;
|
|
46
46
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
47
47
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
48
48
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -1789,15 +1789,9 @@ var ts = (() => {
|
|
|
1789
1789
|
return LogLevel2;
|
|
1790
1790
|
})(LogLevel || {});
|
|
1791
1791
|
((Debug2) => {
|
|
1792
|
-
let typeScriptVersion2;
|
|
1793
1792
|
let currentAssertionLevel = 0 /* None */;
|
|
1794
1793
|
Debug2.currentLogLevel = 2 /* Warning */;
|
|
1795
1794
|
Debug2.isDebugging = false;
|
|
1796
|
-
Debug2.enableDeprecationWarnings = true;
|
|
1797
|
-
function getTypeScriptVersion() {
|
|
1798
|
-
return typeScriptVersion2 != null ? typeScriptVersion2 : typeScriptVersion2 = new Version(version);
|
|
1799
|
-
}
|
|
1800
|
-
Debug2.getTypeScriptVersion = getTypeScriptVersion;
|
|
1801
1795
|
function shouldLog(level) {
|
|
1802
1796
|
return Debug2.currentLogLevel <= level;
|
|
1803
1797
|
}
|
|
@@ -2313,52 +2307,6 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
|
|
|
2313
2307
|
isDebugInfoEnabled = true;
|
|
2314
2308
|
}
|
|
2315
2309
|
Debug2.enableDebugInfo = enableDebugInfo;
|
|
2316
|
-
function formatDeprecationMessage(name, error, errorAfter, since, message) {
|
|
2317
|
-
let deprecationMessage = error ? "DeprecationError: " : "DeprecationWarning: ";
|
|
2318
|
-
deprecationMessage += `'${name}' `;
|
|
2319
|
-
deprecationMessage += since ? `has been deprecated since v${since}` : "is deprecated";
|
|
2320
|
-
deprecationMessage += error ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : ".";
|
|
2321
|
-
deprecationMessage += message ? ` ${formatStringFromArgs(message, [name], 0)}` : "";
|
|
2322
|
-
return deprecationMessage;
|
|
2323
|
-
}
|
|
2324
|
-
function createErrorDeprecation(name, errorAfter, since, message) {
|
|
2325
|
-
const deprecationMessage = formatDeprecationMessage(name, true, errorAfter, since, message);
|
|
2326
|
-
return () => {
|
|
2327
|
-
throw new TypeError(deprecationMessage);
|
|
2328
|
-
};
|
|
2329
|
-
}
|
|
2330
|
-
function createWarningDeprecation(name, errorAfter, since, message) {
|
|
2331
|
-
let hasWrittenDeprecation = false;
|
|
2332
|
-
return () => {
|
|
2333
|
-
if (Debug2.enableDeprecationWarnings && !hasWrittenDeprecation) {
|
|
2334
|
-
log.warn(formatDeprecationMessage(name, false, errorAfter, since, message));
|
|
2335
|
-
hasWrittenDeprecation = true;
|
|
2336
|
-
}
|
|
2337
|
-
};
|
|
2338
|
-
}
|
|
2339
|
-
function createDeprecation(name, options = {}) {
|
|
2340
|
-
var _a2, _b;
|
|
2341
|
-
const version2 = typeof options.typeScriptVersion === "string" ? new Version(options.typeScriptVersion) : (_a2 = options.typeScriptVersion) != null ? _a2 : getTypeScriptVersion();
|
|
2342
|
-
const errorAfter = typeof options.errorAfter === "string" ? new Version(options.errorAfter) : options.errorAfter;
|
|
2343
|
-
const warnAfter = typeof options.warnAfter === "string" ? new Version(options.warnAfter) : options.warnAfter;
|
|
2344
|
-
const since = typeof options.since === "string" ? new Version(options.since) : (_b = options.since) != null ? _b : warnAfter;
|
|
2345
|
-
const error = options.error || errorAfter && version2.compareTo(errorAfter) <= 0;
|
|
2346
|
-
const warn = !warnAfter || version2.compareTo(warnAfter) >= 0;
|
|
2347
|
-
return error ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop;
|
|
2348
|
-
}
|
|
2349
|
-
Debug2.createDeprecation = createDeprecation;
|
|
2350
|
-
function wrapFunction(deprecation, func) {
|
|
2351
|
-
return function() {
|
|
2352
|
-
deprecation();
|
|
2353
|
-
return func.apply(this, arguments);
|
|
2354
|
-
};
|
|
2355
|
-
}
|
|
2356
|
-
function deprecate(func, options) {
|
|
2357
|
-
var _a2;
|
|
2358
|
-
const deprecation = createDeprecation((_a2 = options == null ? void 0 : options.name) != null ? _a2 : getFunctionName(func), options);
|
|
2359
|
-
return wrapFunction(deprecation, func);
|
|
2360
|
-
}
|
|
2361
|
-
Debug2.deprecate = deprecate;
|
|
2362
2310
|
function formatVariance(varianceFlags) {
|
|
2363
2311
|
const variance = varianceFlags & 7 /* VarianceMask */;
|
|
2364
2312
|
let result = variance === 0 /* Invariant */ ? "in out" : variance === 3 /* Bivariant */ ? "[bivariant]" : variance === 2 /* Contravariant */ ? "in" : variance === 1 /* Covariant */ ? "out" : variance === 4 /* Independent */ ? "[independent]" : "";
|
|
@@ -4372,6 +4320,7 @@ ${lanes.join("\n")}
|
|
|
4372
4320
|
return EnumKind2;
|
|
4373
4321
|
})(EnumKind || {});
|
|
4374
4322
|
CheckFlags = /* @__PURE__ */ ((CheckFlags2) => {
|
|
4323
|
+
CheckFlags2[CheckFlags2["None"] = 0] = "None";
|
|
4375
4324
|
CheckFlags2[CheckFlags2["Instantiated"] = 1] = "Instantiated";
|
|
4376
4325
|
CheckFlags2[CheckFlags2["SyntheticProperty"] = 2] = "SyntheticProperty";
|
|
4377
4326
|
CheckFlags2[CheckFlags2["SyntheticMethod"] = 4] = "SyntheticMethod";
|
|
@@ -4419,31 +4368,32 @@ ${lanes.join("\n")}
|
|
|
4419
4368
|
return InternalSymbolName2;
|
|
4420
4369
|
})(InternalSymbolName || {});
|
|
4421
4370
|
NodeCheckFlags = /* @__PURE__ */ ((NodeCheckFlags2) => {
|
|
4371
|
+
NodeCheckFlags2[NodeCheckFlags2["None"] = 0] = "None";
|
|
4422
4372
|
NodeCheckFlags2[NodeCheckFlags2["TypeChecked"] = 1] = "TypeChecked";
|
|
4423
4373
|
NodeCheckFlags2[NodeCheckFlags2["LexicalThis"] = 2] = "LexicalThis";
|
|
4424
4374
|
NodeCheckFlags2[NodeCheckFlags2["CaptureThis"] = 4] = "CaptureThis";
|
|
4425
4375
|
NodeCheckFlags2[NodeCheckFlags2["CaptureNewTarget"] = 8] = "CaptureNewTarget";
|
|
4426
|
-
NodeCheckFlags2[NodeCheckFlags2["SuperInstance"] =
|
|
4427
|
-
NodeCheckFlags2[NodeCheckFlags2["SuperStatic"] =
|
|
4428
|
-
NodeCheckFlags2[NodeCheckFlags2["ContextChecked"] =
|
|
4429
|
-
NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAccessInAsync"] =
|
|
4430
|
-
NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAssignmentInAsync"] =
|
|
4431
|
-
NodeCheckFlags2[NodeCheckFlags2["CaptureArguments"] =
|
|
4432
|
-
NodeCheckFlags2[NodeCheckFlags2["EnumValuesComputed"] =
|
|
4433
|
-
NodeCheckFlags2[NodeCheckFlags2["LexicalModuleMergesWithClass"] =
|
|
4434
|
-
NodeCheckFlags2[NodeCheckFlags2["LoopWithCapturedBlockScopedBinding"] =
|
|
4435
|
-
NodeCheckFlags2[NodeCheckFlags2["ContainsCapturedBlockScopeBinding"] =
|
|
4436
|
-
NodeCheckFlags2[NodeCheckFlags2["CapturedBlockScopedBinding"] =
|
|
4437
|
-
NodeCheckFlags2[NodeCheckFlags2["BlockScopedBindingInLoop"] =
|
|
4438
|
-
NodeCheckFlags2[NodeCheckFlags2["ClassWithBodyScopedClassBinding"] =
|
|
4439
|
-
NodeCheckFlags2[NodeCheckFlags2["BodyScopedClassBinding"] =
|
|
4440
|
-
NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] =
|
|
4441
|
-
NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] =
|
|
4442
|
-
NodeCheckFlags2[NodeCheckFlags2["ClassWithConstructorReference"] =
|
|
4443
|
-
NodeCheckFlags2[NodeCheckFlags2["ConstructorReferenceInClass"] =
|
|
4444
|
-
NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] =
|
|
4445
|
-
NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] =
|
|
4446
|
-
NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] =
|
|
4376
|
+
NodeCheckFlags2[NodeCheckFlags2["SuperInstance"] = 16] = "SuperInstance";
|
|
4377
|
+
NodeCheckFlags2[NodeCheckFlags2["SuperStatic"] = 32] = "SuperStatic";
|
|
4378
|
+
NodeCheckFlags2[NodeCheckFlags2["ContextChecked"] = 64] = "ContextChecked";
|
|
4379
|
+
NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAccessInAsync"] = 128] = "MethodWithSuperPropertyAccessInAsync";
|
|
4380
|
+
NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAssignmentInAsync"] = 256] = "MethodWithSuperPropertyAssignmentInAsync";
|
|
4381
|
+
NodeCheckFlags2[NodeCheckFlags2["CaptureArguments"] = 512] = "CaptureArguments";
|
|
4382
|
+
NodeCheckFlags2[NodeCheckFlags2["EnumValuesComputed"] = 1024] = "EnumValuesComputed";
|
|
4383
|
+
NodeCheckFlags2[NodeCheckFlags2["LexicalModuleMergesWithClass"] = 2048] = "LexicalModuleMergesWithClass";
|
|
4384
|
+
NodeCheckFlags2[NodeCheckFlags2["LoopWithCapturedBlockScopedBinding"] = 4096] = "LoopWithCapturedBlockScopedBinding";
|
|
4385
|
+
NodeCheckFlags2[NodeCheckFlags2["ContainsCapturedBlockScopeBinding"] = 8192] = "ContainsCapturedBlockScopeBinding";
|
|
4386
|
+
NodeCheckFlags2[NodeCheckFlags2["CapturedBlockScopedBinding"] = 16384] = "CapturedBlockScopedBinding";
|
|
4387
|
+
NodeCheckFlags2[NodeCheckFlags2["BlockScopedBindingInLoop"] = 32768] = "BlockScopedBindingInLoop";
|
|
4388
|
+
NodeCheckFlags2[NodeCheckFlags2["ClassWithBodyScopedClassBinding"] = 65536] = "ClassWithBodyScopedClassBinding";
|
|
4389
|
+
NodeCheckFlags2[NodeCheckFlags2["BodyScopedClassBinding"] = 131072] = "BodyScopedClassBinding";
|
|
4390
|
+
NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] = 262144] = "NeedsLoopOutParameter";
|
|
4391
|
+
NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] = 524288] = "AssignmentsMarked";
|
|
4392
|
+
NodeCheckFlags2[NodeCheckFlags2["ClassWithConstructorReference"] = 1048576] = "ClassWithConstructorReference";
|
|
4393
|
+
NodeCheckFlags2[NodeCheckFlags2["ConstructorReferenceInClass"] = 2097152] = "ConstructorReferenceInClass";
|
|
4394
|
+
NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] = 4194304] = "ContainsClassWithPrivateIdentifiers";
|
|
4395
|
+
NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] = 8388608] = "ContainsSuperPropertyInStaticInitializer";
|
|
4396
|
+
NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] = 16777216] = "InCheckIdentifier";
|
|
4447
4397
|
return NodeCheckFlags2;
|
|
4448
4398
|
})(NodeCheckFlags || {});
|
|
4449
4399
|
TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
|
|
@@ -4516,6 +4466,7 @@ ${lanes.join("\n")}
|
|
|
4516
4466
|
return TypeFlags2;
|
|
4517
4467
|
})(TypeFlags || {});
|
|
4518
4468
|
ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
|
|
4469
|
+
ObjectFlags3[ObjectFlags3["None"] = 0] = "None";
|
|
4519
4470
|
ObjectFlags3[ObjectFlags3["Class"] = 1] = "Class";
|
|
4520
4471
|
ObjectFlags3[ObjectFlags3["Interface"] = 2] = "Interface";
|
|
4521
4472
|
ObjectFlags3[ObjectFlags3["Reference"] = 4] = "Reference";
|
|
@@ -4633,6 +4584,7 @@ ${lanes.join("\n")}
|
|
|
4633
4584
|
return TypeMapKind2;
|
|
4634
4585
|
})(TypeMapKind || {});
|
|
4635
4586
|
InferencePriority = /* @__PURE__ */ ((InferencePriority2) => {
|
|
4587
|
+
InferencePriority2[InferencePriority2["None"] = 0] = "None";
|
|
4636
4588
|
InferencePriority2[InferencePriority2["NakedTypeVariable"] = 1] = "NakedTypeVariable";
|
|
4637
4589
|
InferencePriority2[InferencePriority2["SpeculativeTuple"] = 2] = "SpeculativeTuple";
|
|
4638
4590
|
InferencePriority2[InferencePriority2["SubstituteSource"] = 4] = "SubstituteSource";
|
|
@@ -8112,10 +8064,10 @@ ${lanes.join("\n")}
|
|
|
8112
8064
|
Module_name_0_matched_pattern_1: diag(6092, 3 /* Message */, "Module_name_0_matched_pattern_1_6092", "Module name '{0}', matched pattern '{1}'."),
|
|
8113
8065
|
Trying_substitution_0_candidate_module_location_Colon_1: diag(6093, 3 /* Message */, "Trying_substitution_0_candidate_module_location_Colon_1_6093", "Trying substitution '{0}', candidate module location: '{1}'."),
|
|
8114
8066
|
Resolving_module_name_0_relative_to_base_url_1_2: diag(6094, 3 /* Message */, "Resolving_module_name_0_relative_to_base_url_1_2_6094", "Resolving module name '{0}' relative to base url '{1}' - '{2}'."),
|
|
8115
|
-
|
|
8067
|
+
Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1: diag(6095, 3 /* Message */, "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095", "Loading module as file / folder, candidate module location '{0}', target file types: {1}."),
|
|
8116
8068
|
File_0_does_not_exist: diag(6096, 3 /* Message */, "File_0_does_not_exist_6096", "File '{0}' does not exist."),
|
|
8117
8069
|
File_0_exist_use_it_as_a_name_resolution_result: diag(6097, 3 /* Message */, "File_0_exist_use_it_as_a_name_resolution_result_6097", "File '{0}' exist - use it as a name resolution result."),
|
|
8118
|
-
|
|
8070
|
+
Loading_module_0_from_node_modules_folder_target_file_types_Colon_1: diag(6098, 3 /* Message */, "Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098", "Loading module '{0}' from 'node_modules' folder, target file types: {1}."),
|
|
8119
8071
|
Found_package_json_at_0: diag(6099, 3 /* Message */, "Found_package_json_at_0_6099", "Found 'package.json' at '{0}'."),
|
|
8120
8072
|
package_json_does_not_have_a_0_field: diag(6100, 3 /* Message */, "package_json_does_not_have_a_0_field_6100", "'package.json' does not have a '{0}' field."),
|
|
8121
8073
|
package_json_has_0_field_1_that_references_2: diag(6101, 3 /* Message */, "package_json_has_0_field_1_that_references_2_6101", "'package.json' has '{0}' field '{1}' that references '{2}'."),
|
|
@@ -17142,6 +17094,32 @@ ${lanes.join("\n")}
|
|
|
17142
17094
|
function pseudoBigIntToString({ negative, base10Value }) {
|
|
17143
17095
|
return (negative && base10Value !== "0" ? "-" : "") + base10Value;
|
|
17144
17096
|
}
|
|
17097
|
+
function parseBigInt(text) {
|
|
17098
|
+
if (!isValidBigIntString(text, false)) {
|
|
17099
|
+
return void 0;
|
|
17100
|
+
}
|
|
17101
|
+
return parseValidBigInt(text);
|
|
17102
|
+
}
|
|
17103
|
+
function parseValidBigInt(text) {
|
|
17104
|
+
const negative = text.startsWith("-");
|
|
17105
|
+
const base10Value = parsePseudoBigInt(`${negative ? text.slice(1) : text}n`);
|
|
17106
|
+
return { negative, base10Value };
|
|
17107
|
+
}
|
|
17108
|
+
function isValidBigIntString(s, roundTripOnly) {
|
|
17109
|
+
if (s === "")
|
|
17110
|
+
return false;
|
|
17111
|
+
const scanner2 = createScanner(99 /* ESNext */, false);
|
|
17112
|
+
let success = true;
|
|
17113
|
+
scanner2.setOnError(() => success = false);
|
|
17114
|
+
scanner2.setText(s + "n");
|
|
17115
|
+
let result = scanner2.scan();
|
|
17116
|
+
const negative = result === 40 /* MinusToken */;
|
|
17117
|
+
if (negative) {
|
|
17118
|
+
result = scanner2.scan();
|
|
17119
|
+
}
|
|
17120
|
+
const flags = scanner2.getTokenFlags();
|
|
17121
|
+
return success && result === 9 /* BigIntLiteral */ && scanner2.getTextPos() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) }));
|
|
17122
|
+
}
|
|
17145
17123
|
function isValidTypeOnlyAliasUseSite(useSite) {
|
|
17146
17124
|
return !!(useSite.flags & 16777216 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite));
|
|
17147
17125
|
}
|
|
@@ -17468,7 +17446,11 @@ ${lanes.join("\n")}
|
|
|
17468
17446
|
const { isBracketed, typeExpression } = node;
|
|
17469
17447
|
return isBracketed || !!typeExpression && typeExpression.type.kind === 319 /* JSDocOptionalType */;
|
|
17470
17448
|
}
|
|
17471
|
-
|
|
17449
|
+
function canUsePropertyAccess(name, languageVersion) {
|
|
17450
|
+
const firstChar = name.charCodeAt(0);
|
|
17451
|
+
return firstChar === 35 /* hash */ ? name.length > 1 && isIdentifierStart(name.charCodeAt(1), languageVersion) : isIdentifierStart(firstChar, languageVersion);
|
|
17452
|
+
}
|
|
17453
|
+
var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashAMDReferencePathRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, AccessKind, objectAllocator, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsToRemove, emptyFileSystemEntries;
|
|
17472
17454
|
var init_utilities = __esm({
|
|
17473
17455
|
"src/compiler/utilities.ts"() {
|
|
17474
17456
|
"use strict";
|
|
@@ -17618,6 +17600,7 @@ ${lanes.join("\n")}
|
|
|
17618
17600
|
allSupportedExtensions = [[".ts" /* Ts */, ".tsx" /* Tsx */, ".d.ts" /* Dts */, ".js" /* Js */, ".jsx" /* Jsx */], [".cts" /* Cts */, ".d.cts" /* Dcts */, ".cjs" /* Cjs */], [".mts" /* Mts */, ".d.mts" /* Dmts */, ".mjs" /* Mjs */]];
|
|
17619
17601
|
allSupportedExtensionsWithJson = [...allSupportedExtensions, [".json" /* Json */]];
|
|
17620
17602
|
supportedDeclarationExtensions = [".d.ts" /* Dts */, ".d.cts" /* Dcts */, ".d.mts" /* Dmts */];
|
|
17603
|
+
supportedTSImplementationExtensions = [".ts" /* Ts */, ".cts" /* Cts */, ".mts" /* Mts */, ".tsx" /* Tsx */];
|
|
17621
17604
|
extensionsToRemove = [".d.ts" /* Dts */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".mjs" /* Mjs */, ".mts" /* Mts */, ".cjs" /* Cjs */, ".cts" /* Cts */, ".ts" /* Ts */, ".js" /* Js */, ".tsx" /* Tsx */, ".jsx" /* Jsx */, ".json" /* Json */];
|
|
17622
17605
|
emptyFileSystemEntries = {
|
|
17623
17606
|
files: emptyArray,
|
|
@@ -23193,7 +23176,7 @@ ${lanes.join("\n")}
|
|
|
23193
23176
|
var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {
|
|
23194
23177
|
var i, p;
|
|
23195
23178
|
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
23196
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done:
|
|
23179
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
|
|
23197
23180
|
};`
|
|
23198
23181
|
};
|
|
23199
23182
|
asyncValues = {
|
|
@@ -34969,6 +34952,18 @@ ${lanes.join("\n")}
|
|
|
34969
34952
|
return { path: r.path, ext: r.extension };
|
|
34970
34953
|
}
|
|
34971
34954
|
}
|
|
34955
|
+
function formatExtensions(extensions) {
|
|
34956
|
+
const result = [];
|
|
34957
|
+
if (extensions & 1 /* TypeScript */)
|
|
34958
|
+
result.push("TypeScript");
|
|
34959
|
+
if (extensions & 2 /* JavaScript */)
|
|
34960
|
+
result.push("JavaScript");
|
|
34961
|
+
if (extensions & 4 /* Declaration */)
|
|
34962
|
+
result.push("Declaration");
|
|
34963
|
+
if (extensions & 8 /* Json */)
|
|
34964
|
+
result.push("JSON");
|
|
34965
|
+
return result.join(", ");
|
|
34966
|
+
}
|
|
34972
34967
|
function resolvedTypeScriptOnly(resolved) {
|
|
34973
34968
|
if (!resolved) {
|
|
34974
34969
|
return void 0;
|
|
@@ -35170,7 +35165,8 @@ ${lanes.join("\n")}
|
|
|
35170
35165
|
features,
|
|
35171
35166
|
conditions,
|
|
35172
35167
|
requestContainingDirectory: containingDirectory,
|
|
35173
|
-
reportDiagnostic: (diag2) => void diagnostics.push(diag2)
|
|
35168
|
+
reportDiagnostic: (diag2) => void diagnostics.push(diag2),
|
|
35169
|
+
isConfigLookup: false
|
|
35174
35170
|
};
|
|
35175
35171
|
let resolved = primaryLookup();
|
|
35176
35172
|
let primary = true;
|
|
@@ -35220,7 +35216,7 @@ ${lanes.join("\n")}
|
|
|
35220
35216
|
}
|
|
35221
35217
|
return resolvedTypeScriptOnly(
|
|
35222
35218
|
loadNodeModuleFromDirectory(
|
|
35223
|
-
4 /*
|
|
35219
|
+
4 /* Declaration */,
|
|
35224
35220
|
candidate,
|
|
35225
35221
|
!directoryExists,
|
|
35226
35222
|
moduleResolutionState
|
|
@@ -35241,11 +35237,11 @@ ${lanes.join("\n")}
|
|
|
35241
35237
|
}
|
|
35242
35238
|
let result2;
|
|
35243
35239
|
if (!isExternalModuleNameRelative(typeReferenceDirectiveName)) {
|
|
35244
|
-
const searchResult = loadModuleFromNearestNodeModulesDirectory(4 /*
|
|
35240
|
+
const searchResult = loadModuleFromNearestNodeModulesDirectory(4 /* Declaration */, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState, void 0, void 0);
|
|
35245
35241
|
result2 = searchResult && searchResult.value;
|
|
35246
35242
|
} else {
|
|
35247
35243
|
const { path: candidate } = normalizePathForCJSResolution(initialLocationForSecondaryLookup, typeReferenceDirectiveName);
|
|
35248
|
-
result2 = nodeLoadModuleByRelativeName(4 /*
|
|
35244
|
+
result2 = nodeLoadModuleByRelativeName(4 /* Declaration */, candidate, false, moduleResolutionState, true);
|
|
35249
35245
|
}
|
|
35250
35246
|
return resolvedTypeScriptOnly(result2);
|
|
35251
35247
|
} else {
|
|
@@ -35762,31 +35758,39 @@ ${lanes.join("\n")}
|
|
|
35762
35758
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35763
35759
|
const containingDirectory = getDirectoryPath(containingFile);
|
|
35764
35760
|
const esmMode = resolutionMode === 99 /* ESNext */ ? 32 /* EsmMode */ : 0;
|
|
35765
|
-
let extensions = compilerOptions.noDtsResolution ?
|
|
35761
|
+
let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
35766
35762
|
if (compilerOptions.resolveJsonModule) {
|
|
35767
|
-
extensions
|
|
35763
|
+
extensions |= 8 /* Json */;
|
|
35768
35764
|
}
|
|
35769
|
-
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, extensions, redirectedReference);
|
|
35765
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, extensions, false, redirectedReference);
|
|
35770
35766
|
}
|
|
35771
35767
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
35772
|
-
return nodeModuleNameResolverWorker(
|
|
35768
|
+
return nodeModuleNameResolverWorker(
|
|
35769
|
+
0 /* None */,
|
|
35770
|
+
moduleName,
|
|
35771
|
+
initialDir,
|
|
35772
|
+
{ moduleResolution: 2 /* NodeJs */, allowJs: true },
|
|
35773
|
+
host,
|
|
35774
|
+
void 0,
|
|
35775
|
+
2 /* JavaScript */,
|
|
35776
|
+
false,
|
|
35777
|
+
void 0
|
|
35778
|
+
);
|
|
35773
35779
|
}
|
|
35774
|
-
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference,
|
|
35780
|
+
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, isConfigLookup) {
|
|
35775
35781
|
let extensions;
|
|
35776
|
-
if (
|
|
35777
|
-
extensions =
|
|
35782
|
+
if (isConfigLookup) {
|
|
35783
|
+
extensions = 8 /* Json */;
|
|
35778
35784
|
} else if (compilerOptions.noDtsResolution) {
|
|
35779
|
-
extensions =
|
|
35780
|
-
if (compilerOptions.allowJs)
|
|
35781
|
-
extensions.push(1 /* JavaScript */);
|
|
35785
|
+
extensions = 3 /* ImplementationFiles */;
|
|
35782
35786
|
if (compilerOptions.resolveJsonModule)
|
|
35783
|
-
extensions
|
|
35787
|
+
extensions |= 8 /* Json */;
|
|
35784
35788
|
} else {
|
|
35785
|
-
extensions = compilerOptions.resolveJsonModule ?
|
|
35789
|
+
extensions = compilerOptions.resolveJsonModule ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */;
|
|
35786
35790
|
}
|
|
35787
|
-
return nodeModuleNameResolverWorker(0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, redirectedReference);
|
|
35791
|
+
return nodeModuleNameResolverWorker(0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference);
|
|
35788
35792
|
}
|
|
35789
|
-
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, redirectedReference) {
|
|
35793
|
+
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) {
|
|
35790
35794
|
var _a2, _b;
|
|
35791
35795
|
const traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
35792
35796
|
const failedLookupLocations = [];
|
|
@@ -35806,12 +35810,20 @@ ${lanes.join("\n")}
|
|
|
35806
35810
|
features,
|
|
35807
35811
|
conditions,
|
|
35808
35812
|
requestContainingDirectory: containingDirectory,
|
|
35809
|
-
reportDiagnostic: (diag2) => void diagnostics.push(diag2)
|
|
35813
|
+
reportDiagnostic: (diag2) => void diagnostics.push(diag2),
|
|
35814
|
+
isConfigLookup
|
|
35810
35815
|
};
|
|
35811
35816
|
if (traceEnabled && getEmitModuleResolutionKind(compilerOptions) >= 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) <= 99 /* NodeNext */) {
|
|
35812
35817
|
trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", "));
|
|
35813
35818
|
}
|
|
35814
|
-
|
|
35819
|
+
let result;
|
|
35820
|
+
if (getEmitModuleResolutionKind(compilerOptions) === 2 /* NodeJs */) {
|
|
35821
|
+
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
35822
|
+
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
35823
|
+
result = priorityExtensions && tryResolve(priorityExtensions) || secondaryExtensions && tryResolve(secondaryExtensions) || void 0;
|
|
35824
|
+
} else {
|
|
35825
|
+
result = tryResolve(extensions);
|
|
35826
|
+
}
|
|
35815
35827
|
return createResolvedModuleWithFailedLookupLocations(
|
|
35816
35828
|
(_a2 = result == null ? void 0 : result.value) == null ? void 0 : _a2.resolved,
|
|
35817
35829
|
(_b = result == null ? void 0 : result.value) == null ? void 0 : _b.isExternalLibraryImport,
|
|
@@ -35836,7 +35848,7 @@ ${lanes.join("\n")}
|
|
|
35836
35848
|
}
|
|
35837
35849
|
if (!resolved2) {
|
|
35838
35850
|
if (traceEnabled) {
|
|
35839
|
-
trace(host, Diagnostics.
|
|
35851
|
+
trace(host, Diagnostics.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, moduleName, formatExtensions(extensions2));
|
|
35840
35852
|
}
|
|
35841
35853
|
resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory, state, cache, redirectedReference);
|
|
35842
35854
|
}
|
|
@@ -35877,7 +35889,7 @@ ${lanes.join("\n")}
|
|
|
35877
35889
|
}
|
|
35878
35890
|
function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
|
|
35879
35891
|
if (state.traceEnabled) {
|
|
35880
|
-
trace(state.host, Diagnostics.
|
|
35892
|
+
trace(state.host, Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1, candidate, formatExtensions(extensions));
|
|
35881
35893
|
}
|
|
35882
35894
|
if (!hasTrailingDirectorySeparator(candidate)) {
|
|
35883
35895
|
if (!onlyRecordFailures) {
|
|
@@ -35934,10 +35946,9 @@ ${lanes.join("\n")}
|
|
|
35934
35946
|
return noPackageId(loadModuleFromFile(extensions, candidate, onlyRecordFailures, state));
|
|
35935
35947
|
}
|
|
35936
35948
|
function loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) {
|
|
35937
|
-
|
|
35938
|
-
|
|
35939
|
-
|
|
35940
|
-
return extensionLess === void 0 && extensions === 2 /* Json */ ? void 0 : tryAddingExtensions(extensionLess || candidate, extensions, extension, onlyRecordFailures, state);
|
|
35949
|
+
const resolvedByReplacingExtension = loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state);
|
|
35950
|
+
if (resolvedByReplacingExtension) {
|
|
35951
|
+
return resolvedByReplacingExtension;
|
|
35941
35952
|
}
|
|
35942
35953
|
if (!(state.features & 32 /* EsmMode */)) {
|
|
35943
35954
|
const resolvedByAddingExtension = tryAddingExtensions(candidate, extensions, "", onlyRecordFailures, state);
|
|
@@ -35945,10 +35956,9 @@ ${lanes.join("\n")}
|
|
|
35945
35956
|
return resolvedByAddingExtension;
|
|
35946
35957
|
}
|
|
35947
35958
|
}
|
|
35948
|
-
return loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state);
|
|
35949
35959
|
}
|
|
35950
35960
|
function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) {
|
|
35951
|
-
if (hasJSFileExtension(candidate) || fileExtensionIs(candidate, ".json" /* Json */)
|
|
35961
|
+
if (hasJSFileExtension(candidate) || extensions & 8 /* Json */ && fileExtensionIs(candidate, ".json" /* Json */)) {
|
|
35952
35962
|
const extensionless = removeFileExtension(candidate);
|
|
35953
35963
|
const extension = candidate.substring(extensionless.length);
|
|
35954
35964
|
if (state.traceEnabled) {
|
|
@@ -35958,7 +35968,7 @@ ${lanes.join("\n")}
|
|
|
35958
35968
|
}
|
|
35959
35969
|
}
|
|
35960
35970
|
function loadJSOrExactTSFileName(extensions, candidate, onlyRecordFailures, state) {
|
|
35961
|
-
if (
|
|
35971
|
+
if (extensions & 1 /* TypeScript */ && fileExtensionIsOneOf(candidate, supportedTSImplementationExtensions) || extensions & 4 /* Declaration */ && fileExtensionIsOneOf(candidate, supportedDeclarationExtensions)) {
|
|
35962
35972
|
const result = tryFile(candidate, onlyRecordFailures, state);
|
|
35963
35973
|
return result !== void 0 ? { path: candidate, ext: tryExtractTSExtension(candidate) } : void 0;
|
|
35964
35974
|
}
|
|
@@ -35971,59 +35981,32 @@ ${lanes.join("\n")}
|
|
|
35971
35981
|
onlyRecordFailures = !directoryProbablyExists(directory, state.host);
|
|
35972
35982
|
}
|
|
35973
35983
|
}
|
|
35974
|
-
switch (
|
|
35975
|
-
case
|
|
35976
|
-
|
|
35977
|
-
|
|
35978
|
-
|
|
35979
|
-
|
|
35980
|
-
|
|
35981
|
-
|
|
35982
|
-
|
|
35983
|
-
|
|
35984
|
-
|
|
35985
|
-
|
|
35986
|
-
|
|
35987
|
-
|
|
35988
|
-
|
|
35989
|
-
return
|
|
35990
|
-
}
|
|
35991
|
-
case 0 /* TypeScript */:
|
|
35992
|
-
case 5 /* TsOnly */:
|
|
35993
|
-
const useDts = extensions === 0 /* TypeScript */;
|
|
35994
|
-
switch (originalExtension) {
|
|
35995
|
-
case ".mjs" /* Mjs */:
|
|
35996
|
-
case ".mts" /* Mts */:
|
|
35997
|
-
case ".d.mts" /* Dmts */:
|
|
35998
|
-
return tryExtension(".mts" /* Mts */) || (useDts ? tryExtension(".d.mts" /* Dmts */) : void 0);
|
|
35999
|
-
case ".cjs" /* Cjs */:
|
|
36000
|
-
case ".cts" /* Cts */:
|
|
36001
|
-
case ".d.cts" /* Dcts */:
|
|
36002
|
-
return tryExtension(".cts" /* Cts */) || (useDts ? tryExtension(".d.cts" /* Dcts */) : void 0);
|
|
36003
|
-
case ".json" /* Json */:
|
|
36004
|
-
candidate += ".json" /* Json */;
|
|
36005
|
-
return useDts ? tryExtension(".d.ts" /* Dts */) : void 0;
|
|
36006
|
-
default:
|
|
36007
|
-
return tryExtension(".ts" /* Ts */) || tryExtension(".tsx" /* Tsx */) || (useDts ? tryExtension(".d.ts" /* Dts */) : void 0);
|
|
36008
|
-
}
|
|
36009
|
-
case 1 /* JavaScript */:
|
|
36010
|
-
switch (originalExtension) {
|
|
36011
|
-
case ".mjs" /* Mjs */:
|
|
36012
|
-
case ".mts" /* Mts */:
|
|
36013
|
-
case ".d.mts" /* Dmts */:
|
|
36014
|
-
return tryExtension(".mjs" /* Mjs */);
|
|
36015
|
-
case ".cjs" /* Cjs */:
|
|
36016
|
-
case ".cts" /* Cts */:
|
|
36017
|
-
case ".d.cts" /* Dcts */:
|
|
36018
|
-
return tryExtension(".cjs" /* Cjs */);
|
|
36019
|
-
case ".json" /* Json */:
|
|
36020
|
-
return tryExtension(".json" /* Json */);
|
|
36021
|
-
default:
|
|
36022
|
-
return tryExtension(".js" /* Js */) || tryExtension(".jsx" /* Jsx */);
|
|
35984
|
+
switch (originalExtension) {
|
|
35985
|
+
case ".mjs" /* Mjs */:
|
|
35986
|
+
case ".mts" /* Mts */:
|
|
35987
|
+
case ".d.mts" /* Dmts */:
|
|
35988
|
+
return extensions & 1 /* TypeScript */ && tryExtension(".mts" /* Mts */) || extensions & 4 /* Declaration */ && tryExtension(".d.mts" /* Dmts */) || extensions & 2 /* JavaScript */ && tryExtension(".mjs" /* Mjs */) || void 0;
|
|
35989
|
+
case ".cjs" /* Cjs */:
|
|
35990
|
+
case ".cts" /* Cts */:
|
|
35991
|
+
case ".d.cts" /* Dcts */:
|
|
35992
|
+
return extensions & 1 /* TypeScript */ && tryExtension(".cts" /* Cts */) || extensions & 4 /* Declaration */ && tryExtension(".d.cts" /* Dcts */) || extensions & 2 /* JavaScript */ && tryExtension(".cjs" /* Cjs */) || void 0;
|
|
35993
|
+
case ".json" /* Json */:
|
|
35994
|
+
const originalCandidate = candidate;
|
|
35995
|
+
if (extensions & 4 /* Declaration */) {
|
|
35996
|
+
candidate += ".json" /* Json */;
|
|
35997
|
+
const result = tryExtension(".d.ts" /* Dts */);
|
|
35998
|
+
if (result)
|
|
35999
|
+
return result;
|
|
36023
36000
|
}
|
|
36024
|
-
|
|
36025
|
-
|
|
36026
|
-
|
|
36001
|
+
if (extensions & 8 /* Json */) {
|
|
36002
|
+
candidate = originalCandidate;
|
|
36003
|
+
const result = tryExtension(".json" /* Json */);
|
|
36004
|
+
if (result)
|
|
36005
|
+
return result;
|
|
36006
|
+
}
|
|
36007
|
+
return void 0;
|
|
36008
|
+
default:
|
|
36009
|
+
return extensions & 1 /* TypeScript */ && (tryExtension(".ts" /* Ts */) || tryExtension(".tsx" /* Tsx */)) || extensions & 4 /* Declaration */ && tryExtension(".d.ts" /* Dts */) || extensions & 2 /* JavaScript */ && (tryExtension(".js" /* Js */) || tryExtension(".jsx" /* Jsx */)) || state.isConfigLookup && tryExtension(".json" /* Json */) || void 0;
|
|
36027
36010
|
}
|
|
36028
36011
|
function tryExtension(ext) {
|
|
36029
36012
|
const path = tryFile(candidate + ext, onlyRecordFailures, state);
|
|
@@ -36066,7 +36049,7 @@ ${lanes.join("\n")}
|
|
|
36066
36049
|
return packageJsonInfo.contents.resolvedEntrypoints;
|
|
36067
36050
|
}
|
|
36068
36051
|
let entrypoints;
|
|
36069
|
-
const extensions = resolveJs ?
|
|
36052
|
+
const extensions = 1 /* TypeScript */ | 4 /* Declaration */ | (resolveJs ? 2 /* JavaScript */ : 0);
|
|
36070
36053
|
const features = getDefaultNodeResolutionFeatures(options);
|
|
36071
36054
|
const requireState = getTemporaryModuleResolutionState(cache == null ? void 0 : cache.getPackageJsonInfoCache(), host, options);
|
|
36072
36055
|
requireState.conditions = ["node", "require", "types"];
|
|
@@ -36154,7 +36137,8 @@ ${lanes.join("\n")}
|
|
|
36154
36137
|
features: 0 /* None */,
|
|
36155
36138
|
conditions: emptyArray,
|
|
36156
36139
|
requestContainingDirectory: void 0,
|
|
36157
|
-
reportDiagnostic: noop
|
|
36140
|
+
reportDiagnostic: noop,
|
|
36141
|
+
isConfigLookup: false
|
|
36158
36142
|
};
|
|
36159
36143
|
}
|
|
36160
36144
|
function getPackageScopeForPath(fileName, state) {
|
|
@@ -36213,23 +36197,10 @@ ${lanes.join("\n")}
|
|
|
36213
36197
|
function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, jsonContent, versionPaths) {
|
|
36214
36198
|
let packageFile;
|
|
36215
36199
|
if (jsonContent) {
|
|
36216
|
-
|
|
36217
|
-
|
|
36218
|
-
|
|
36219
|
-
|
|
36220
|
-
packageFile = readPackageJsonMainField(jsonContent, candidate, state);
|
|
36221
|
-
break;
|
|
36222
|
-
case 0 /* TypeScript */:
|
|
36223
|
-
packageFile = readPackageJsonTypesFields(jsonContent, candidate, state) || readPackageJsonMainField(jsonContent, candidate, state);
|
|
36224
|
-
break;
|
|
36225
|
-
case 4 /* DtsOnly */:
|
|
36226
|
-
packageFile = readPackageJsonTypesFields(jsonContent, candidate, state);
|
|
36227
|
-
break;
|
|
36228
|
-
case 3 /* TSConfig */:
|
|
36229
|
-
packageFile = readPackageJsonTSConfigField(jsonContent, candidate, state);
|
|
36230
|
-
break;
|
|
36231
|
-
default:
|
|
36232
|
-
return Debug.assertNever(extensions);
|
|
36200
|
+
if (state.isConfigLookup) {
|
|
36201
|
+
packageFile = readPackageJsonTSConfigField(jsonContent, candidate, state);
|
|
36202
|
+
} else {
|
|
36203
|
+
packageFile = extensions & 4 /* Declaration */ && readPackageJsonTypesFields(jsonContent, candidate, state) || extensions & (3 /* ImplementationFiles */ | 4 /* Declaration */) && readPackageJsonMainField(jsonContent, candidate, state) || void 0;
|
|
36233
36204
|
}
|
|
36234
36205
|
}
|
|
36235
36206
|
const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => {
|
|
@@ -36243,18 +36214,18 @@ ${lanes.join("\n")}
|
|
|
36243
36214
|
trace(state2.host, Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile);
|
|
36244
36215
|
}
|
|
36245
36216
|
}
|
|
36246
|
-
const
|
|
36217
|
+
const expandedExtensions = extensions2 === 4 /* Declaration */ ? 1 /* TypeScript */ | 4 /* Declaration */ : extensions2;
|
|
36247
36218
|
const features = state2.features;
|
|
36248
36219
|
if ((jsonContent == null ? void 0 : jsonContent.type) !== "module") {
|
|
36249
36220
|
state2.features &= ~32 /* EsmMode */;
|
|
36250
36221
|
}
|
|
36251
|
-
const result = nodeLoadModuleByRelativeName(
|
|
36222
|
+
const result = nodeLoadModuleByRelativeName(expandedExtensions, candidate2, onlyRecordFailures2, state2, false);
|
|
36252
36223
|
state2.features = features;
|
|
36253
36224
|
return result;
|
|
36254
36225
|
};
|
|
36255
36226
|
const onlyRecordFailuresForPackageFile = packageFile ? !directoryProbablyExists(getDirectoryPath(packageFile), state.host) : void 0;
|
|
36256
36227
|
const onlyRecordFailuresForIndex = onlyRecordFailures || !directoryProbablyExists(candidate, state.host);
|
|
36257
|
-
const indexPath = combinePaths(candidate,
|
|
36228
|
+
const indexPath = combinePaths(candidate, state.isConfigLookup ? "tsconfig" : "index");
|
|
36258
36229
|
if (versionPaths && (!packageFile || containsPath(candidate, packageFile))) {
|
|
36259
36230
|
const moduleName = getRelativePathFromDirectory(candidate, packageFile || indexPath, false);
|
|
36260
36231
|
if (state.traceEnabled) {
|
|
@@ -36277,19 +36248,7 @@ ${lanes.join("\n")}
|
|
|
36277
36248
|
return ext !== void 0 && extensionIsOk(extensions, ext) ? { path, ext } : void 0;
|
|
36278
36249
|
}
|
|
36279
36250
|
function extensionIsOk(extensions, extension) {
|
|
36280
|
-
|
|
36281
|
-
case 1 /* JavaScript */:
|
|
36282
|
-
return extension === ".js" /* Js */ || extension === ".jsx" /* Jsx */ || extension === ".mjs" /* Mjs */ || extension === ".cjs" /* Cjs */;
|
|
36283
|
-
case 3 /* TSConfig */:
|
|
36284
|
-
case 2 /* Json */:
|
|
36285
|
-
return extension === ".json" /* Json */;
|
|
36286
|
-
case 0 /* TypeScript */:
|
|
36287
|
-
return extension === ".ts" /* Ts */ || extension === ".tsx" /* Tsx */ || extension === ".mts" /* Mts */ || extension === ".cts" /* Cts */ || extension === ".d.ts" /* Dts */ || extension === ".d.mts" /* Dmts */ || extension === ".d.cts" /* Dcts */;
|
|
36288
|
-
case 5 /* TsOnly */:
|
|
36289
|
-
return extension === ".ts" /* Ts */ || extension === ".tsx" /* Tsx */ || extension === ".mts" /* Mts */ || extension === ".cts" /* Cts */;
|
|
36290
|
-
case 4 /* DtsOnly */:
|
|
36291
|
-
return extension === ".d.ts" /* Dts */ || extension === ".d.mts" /* Dmts */ || extension === ".d.cts" /* Dcts */;
|
|
36292
|
-
}
|
|
36251
|
+
return extensions & 2 /* JavaScript */ && (extension === ".js" /* Js */ || extension === ".jsx" /* Jsx */ || extension === ".mjs" /* Mjs */ || extension === ".cjs" /* Cjs */) || extensions & 1 /* TypeScript */ && (extension === ".ts" /* Ts */ || extension === ".tsx" /* Tsx */ || extension === ".mts" /* Mts */ || extension === ".cts" /* Cts */) || extensions & 4 /* Declaration */ && (extension === ".d.ts" /* Dts */ || extension === ".d.mts" /* Dmts */ || extension === ".d.cts" /* Dcts */) || extensions & 8 /* Json */ && extension === ".json" /* Json */ || false;
|
|
36293
36252
|
}
|
|
36294
36253
|
function parsePackageName(moduleName) {
|
|
36295
36254
|
let idx = moduleName.indexOf(directorySeparator);
|
|
@@ -36451,7 +36410,7 @@ ${lanes.join("\n")}
|
|
|
36451
36410
|
const combinedLookup = pattern ? target.replace(/\*/g, subpath) : target + subpath;
|
|
36452
36411
|
traceIfEnabled(state, Diagnostics.Using_0_subpath_1_with_target_2, "imports", key, combinedLookup);
|
|
36453
36412
|
traceIfEnabled(state, Diagnostics.Resolving_module_0_from_1, combinedLookup, scope.packageDirectory + "/");
|
|
36454
|
-
const result = nodeModuleNameResolverWorker(state.features, combinedLookup, scope.packageDirectory + "/", state.compilerOptions, state.host, cache,
|
|
36413
|
+
const result = nodeModuleNameResolverWorker(state.features, combinedLookup, scope.packageDirectory + "/", state.compilerOptions, state.host, cache, extensions, false, redirectedReference);
|
|
36455
36414
|
return toSearchResult(result.resolvedModule ? { path: result.resolvedModule.resolvedFileName, extension: result.resolvedModule.extension, packageId: result.resolvedModule.packageId, originalPath: result.resolvedModule.originalPath } : void 0);
|
|
36456
36415
|
}
|
|
36457
36416
|
if (state.traceEnabled) {
|
|
@@ -36542,7 +36501,7 @@ ${lanes.join("\n")}
|
|
|
36542
36501
|
}
|
|
36543
36502
|
function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
|
|
36544
36503
|
var _a2, _b, _c, _d;
|
|
36545
|
-
if (
|
|
36504
|
+
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames()) : true)) {
|
|
36546
36505
|
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames });
|
|
36547
36506
|
const commonSourceDirGuesses = [];
|
|
36548
36507
|
if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
|
|
@@ -36579,10 +36538,9 @@ ${lanes.join("\n")}
|
|
|
36579
36538
|
if (fileExtensionIs(possibleInputBase, ext)) {
|
|
36580
36539
|
const inputExts = getPossibleOriginalInputExtensionForExtension(possibleInputBase);
|
|
36581
36540
|
for (const possibleExt of inputExts) {
|
|
36582
|
-
|
|
36583
|
-
if (extensions === 0 /* TypeScript */ && hasJSFileExtension(possibleInputWithInputExtension) || extensions === 1 /* JavaScript */ && hasTSFileExtension(possibleInputWithInputExtension)) {
|
|
36541
|
+
if (!extensionIsOk(extensions, possibleExt))
|
|
36584
36542
|
continue;
|
|
36585
|
-
|
|
36543
|
+
const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames());
|
|
36586
36544
|
if (state.host.fileExists(possibleInputWithInputExtension)) {
|
|
36587
36545
|
return toSearchResult(withPackageId(scope, loadJSOrExactTSFileName(extensions, possibleInputWithInputExtension, false, state)));
|
|
36588
36546
|
}
|
|
@@ -36623,19 +36581,31 @@ ${lanes.join("\n")}
|
|
|
36623
36581
|
return loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, directory, state, false, cache, redirectedReference);
|
|
36624
36582
|
}
|
|
36625
36583
|
function loadModuleFromNearestNodeModulesDirectoryTypesScope(moduleName, directory, state) {
|
|
36626
|
-
return loadModuleFromNearestNodeModulesDirectoryWorker(4 /*
|
|
36584
|
+
return loadModuleFromNearestNodeModulesDirectoryWorker(4 /* Declaration */, moduleName, directory, state, true, void 0, void 0);
|
|
36627
36585
|
}
|
|
36628
36586
|
function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) {
|
|
36629
36587
|
const perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName, state.features === 0 ? void 0 : state.features & 32 /* EsmMode */ ? 99 /* ESNext */ : 1 /* CommonJS */, redirectedReference);
|
|
36630
|
-
|
|
36631
|
-
|
|
36632
|
-
|
|
36633
|
-
|
|
36634
|
-
|
|
36588
|
+
const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */);
|
|
36589
|
+
const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */);
|
|
36590
|
+
if (priorityExtensions) {
|
|
36591
|
+
const result = lookup(priorityExtensions);
|
|
36592
|
+
if (result)
|
|
36593
|
+
return result;
|
|
36594
|
+
}
|
|
36595
|
+
if (secondaryExtensions && !typesScopeOnly) {
|
|
36596
|
+
return lookup(secondaryExtensions);
|
|
36597
|
+
}
|
|
36598
|
+
function lookup(extensions2) {
|
|
36599
|
+
return forEachAncestorDirectory(normalizeSlashes(directory), (ancestorDirectory) => {
|
|
36600
|
+
if (getBaseFileName(ancestorDirectory) !== "node_modules") {
|
|
36601
|
+
const resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, ancestorDirectory, state);
|
|
36602
|
+
if (resolutionFromCache) {
|
|
36603
|
+
return resolutionFromCache;
|
|
36604
|
+
}
|
|
36605
|
+
return toSearchResult(loadModuleFromImmediateNodeModulesDirectory(extensions2, moduleName, ancestorDirectory, state, typesScopeOnly, cache, redirectedReference));
|
|
36635
36606
|
}
|
|
36636
|
-
|
|
36637
|
-
|
|
36638
|
-
});
|
|
36607
|
+
});
|
|
36608
|
+
}
|
|
36639
36609
|
}
|
|
36640
36610
|
function loadModuleFromImmediateNodeModulesDirectory(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) {
|
|
36641
36611
|
const nodeModulesFolder = combinePaths(directory, "node_modules");
|
|
@@ -36643,11 +36613,13 @@ ${lanes.join("\n")}
|
|
|
36643
36613
|
if (!nodeModulesFolderExists && state.traceEnabled) {
|
|
36644
36614
|
trace(state.host, Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesFolder);
|
|
36645
36615
|
}
|
|
36646
|
-
|
|
36647
|
-
|
|
36648
|
-
|
|
36616
|
+
if (!typesScopeOnly) {
|
|
36617
|
+
const packageResult = loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, state, cache, redirectedReference);
|
|
36618
|
+
if (packageResult) {
|
|
36619
|
+
return packageResult;
|
|
36620
|
+
}
|
|
36649
36621
|
}
|
|
36650
|
-
if (extensions
|
|
36622
|
+
if (extensions & 4 /* Declaration */) {
|
|
36651
36623
|
const nodeModulesAtTypes2 = combinePaths(nodeModulesFolder, "@types");
|
|
36652
36624
|
let nodeModulesAtTypesExists = nodeModulesFolderExists;
|
|
36653
36625
|
if (nodeModulesFolderExists && !directoryProbablyExists(nodeModulesAtTypes2, state.host)) {
|
|
@@ -36656,7 +36628,7 @@ ${lanes.join("\n")}
|
|
|
36656
36628
|
}
|
|
36657
36629
|
nodeModulesAtTypesExists = false;
|
|
36658
36630
|
}
|
|
36659
|
-
return loadModuleFromSpecificNodeModulesDirectory(4 /*
|
|
36631
|
+
return loadModuleFromSpecificNodeModulesDirectory(4 /* Declaration */, mangleScopedPackageNameWithTrace(moduleName, state), nodeModulesAtTypes2, nodeModulesAtTypesExists, state, cache, redirectedReference);
|
|
36660
36632
|
}
|
|
36661
36633
|
}
|
|
36662
36634
|
function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, cache, redirectedReference) {
|
|
@@ -36796,9 +36768,10 @@ ${lanes.join("\n")}
|
|
|
36796
36768
|
features: 0 /* None */,
|
|
36797
36769
|
conditions: [],
|
|
36798
36770
|
requestContainingDirectory: containingDirectory,
|
|
36799
|
-
reportDiagnostic: (diag2) => void diagnostics.push(diag2)
|
|
36771
|
+
reportDiagnostic: (diag2) => void diagnostics.push(diag2),
|
|
36772
|
+
isConfigLookup: false
|
|
36800
36773
|
};
|
|
36801
|
-
const resolved = tryResolve(
|
|
36774
|
+
const resolved = tryResolve(1 /* TypeScript */ | 4 /* Declaration */) || tryResolve(2 /* JavaScript */ | (compilerOptions.resolveJsonModule ? 8 /* Json */ : 0));
|
|
36802
36775
|
return createResolvedModuleWithFailedLookupLocations(
|
|
36803
36776
|
resolved && resolved.value,
|
|
36804
36777
|
false,
|
|
@@ -36825,7 +36798,7 @@ ${lanes.join("\n")}
|
|
|
36825
36798
|
if (resolved2) {
|
|
36826
36799
|
return resolved2;
|
|
36827
36800
|
}
|
|
36828
|
-
if (extensions
|
|
36801
|
+
if (extensions & (1 /* TypeScript */ | 4 /* Declaration */)) {
|
|
36829
36802
|
return loadModuleFromNearestNodeModulesDirectoryTypesScope(moduleName, containingDirectory, state);
|
|
36830
36803
|
}
|
|
36831
36804
|
} else {
|
|
@@ -36852,9 +36825,10 @@ ${lanes.join("\n")}
|
|
|
36852
36825
|
features: 0 /* None */,
|
|
36853
36826
|
conditions: [],
|
|
36854
36827
|
requestContainingDirectory: void 0,
|
|
36855
|
-
reportDiagnostic: (diag2) => void diagnostics.push(diag2)
|
|
36828
|
+
reportDiagnostic: (diag2) => void diagnostics.push(diag2),
|
|
36829
|
+
isConfigLookup: false
|
|
36856
36830
|
};
|
|
36857
|
-
const resolved = loadModuleFromImmediateNodeModulesDirectory(4 /*
|
|
36831
|
+
const resolved = loadModuleFromImmediateNodeModulesDirectory(4 /* Declaration */, moduleName, globalCache, state, false, void 0, void 0);
|
|
36858
36832
|
return createResolvedModuleWithFailedLookupLocations(
|
|
36859
36833
|
resolved,
|
|
36860
36834
|
true,
|
|
@@ -36872,20 +36846,11 @@ ${lanes.join("\n")}
|
|
|
36872
36846
|
trace(state.host, diagnostic, ...args);
|
|
36873
36847
|
}
|
|
36874
36848
|
}
|
|
36875
|
-
var
|
|
36849
|
+
var typeScriptVersion, nodeModulesAtTypes, NodeResolutionFeatures, nodeModulesPathPart, mangledScopedPackageSeparator;
|
|
36876
36850
|
var init_moduleNameResolver = __esm({
|
|
36877
36851
|
"src/compiler/moduleNameResolver.ts"() {
|
|
36878
36852
|
"use strict";
|
|
36879
36853
|
init_ts2();
|
|
36880
|
-
Extensions = /* @__PURE__ */ ((Extensions2) => {
|
|
36881
|
-
Extensions2[Extensions2["TypeScript"] = 0] = "TypeScript";
|
|
36882
|
-
Extensions2[Extensions2["JavaScript"] = 1] = "JavaScript";
|
|
36883
|
-
Extensions2[Extensions2["Json"] = 2] = "Json";
|
|
36884
|
-
Extensions2[Extensions2["TSConfig"] = 3] = "TSConfig";
|
|
36885
|
-
Extensions2[Extensions2["DtsOnly"] = 4] = "DtsOnly";
|
|
36886
|
-
Extensions2[Extensions2["TsOnly"] = 5] = "TsOnly";
|
|
36887
|
-
return Extensions2;
|
|
36888
|
-
})(Extensions || {});
|
|
36889
36854
|
nodeModulesAtTypes = combinePaths("node_modules", "@types");
|
|
36890
36855
|
NodeResolutionFeatures = /* @__PURE__ */ ((NodeResolutionFeatures2) => {
|
|
36891
36856
|
NodeResolutionFeatures2[NodeResolutionFeatures2["None"] = 0] = "None";
|
|
@@ -36899,10 +36864,6 @@ ${lanes.join("\n")}
|
|
|
36899
36864
|
NodeResolutionFeatures2[NodeResolutionFeatures2["EsmMode"] = 32] = "EsmMode";
|
|
36900
36865
|
return NodeResolutionFeatures2;
|
|
36901
36866
|
})(NodeResolutionFeatures || {});
|
|
36902
|
-
jsOnlyExtensions = [1 /* JavaScript */];
|
|
36903
|
-
tsExtensions = [0 /* TypeScript */, 1 /* JavaScript */];
|
|
36904
|
-
tsPlusJsonExtensions = [...tsExtensions, 2 /* Json */];
|
|
36905
|
-
tsconfigExtensions = [3 /* TSConfig */];
|
|
36906
36867
|
nodeModulesPathPart = "/node_modules/";
|
|
36907
36868
|
mangledScopedPackageSeparator = "__";
|
|
36908
36869
|
}
|
|
@@ -39888,6 +39849,7 @@ ${lanes.join("\n")}
|
|
|
39888
39849
|
const importedFileIsInNodeModules = some(modulePaths, (p) => p.isInNodeModules);
|
|
39889
39850
|
let nodeModulesSpecifiers;
|
|
39890
39851
|
let pathsSpecifiers;
|
|
39852
|
+
let redirectPathsSpecifiers;
|
|
39891
39853
|
let relativeSpecifiers;
|
|
39892
39854
|
for (const modulePath of modulePaths) {
|
|
39893
39855
|
const specifier = tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, userPreferences, void 0, options.overrideImportMode);
|
|
@@ -39896,34 +39858,53 @@ ${lanes.join("\n")}
|
|
|
39896
39858
|
return nodeModulesSpecifiers;
|
|
39897
39859
|
}
|
|
39898
39860
|
if (!specifier) {
|
|
39899
|
-
const local = getLocalModuleSpecifier(
|
|
39900
|
-
|
|
39861
|
+
const local = getLocalModuleSpecifier(
|
|
39862
|
+
modulePath.path,
|
|
39863
|
+
info,
|
|
39864
|
+
compilerOptions,
|
|
39865
|
+
host,
|
|
39866
|
+
options.overrideImportMode || importingSourceFile.impliedNodeFormat,
|
|
39867
|
+
preferences,
|
|
39868
|
+
modulePath.isRedirect
|
|
39869
|
+
);
|
|
39870
|
+
if (!local) {
|
|
39871
|
+
continue;
|
|
39872
|
+
}
|
|
39873
|
+
if (modulePath.isRedirect) {
|
|
39874
|
+
redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
|
|
39875
|
+
} else if (pathIsBareSpecifier(local)) {
|
|
39901
39876
|
pathsSpecifiers = append(pathsSpecifiers, local);
|
|
39902
|
-
} else if (!
|
|
39877
|
+
} else if (!importedFileIsInNodeModules || modulePath.isInNodeModules) {
|
|
39903
39878
|
relativeSpecifiers = append(relativeSpecifiers, local);
|
|
39904
39879
|
}
|
|
39905
39880
|
}
|
|
39906
39881
|
}
|
|
39907
|
-
return (pathsSpecifiers == null ? void 0 : pathsSpecifiers.length) ? pathsSpecifiers : (nodeModulesSpecifiers == null ? void 0 : nodeModulesSpecifiers.length) ? nodeModulesSpecifiers : Debug.checkDefined(relativeSpecifiers);
|
|
39882
|
+
return (pathsSpecifiers == null ? void 0 : pathsSpecifiers.length) ? pathsSpecifiers : (redirectPathsSpecifiers == null ? void 0 : redirectPathsSpecifiers.length) ? redirectPathsSpecifiers : (nodeModulesSpecifiers == null ? void 0 : nodeModulesSpecifiers.length) ? nodeModulesSpecifiers : Debug.checkDefined(relativeSpecifiers);
|
|
39908
39883
|
}
|
|
39909
39884
|
function getInfo(importingSourceFileName, host) {
|
|
39910
39885
|
const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames ? host.useCaseSensitiveFileNames() : true);
|
|
39911
39886
|
const sourceDirectory = getDirectoryPath(importingSourceFileName);
|
|
39912
39887
|
return { getCanonicalFileName, importingSourceFileName, sourceDirectory };
|
|
39913
39888
|
}
|
|
39914
|
-
function getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, importMode, { ending, relativePreference }) {
|
|
39889
|
+
function getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, importMode, { ending, relativePreference }, pathsOnly) {
|
|
39915
39890
|
const { baseUrl, paths, rootDirs } = compilerOptions;
|
|
39891
|
+
if (pathsOnly && !paths) {
|
|
39892
|
+
return void 0;
|
|
39893
|
+
}
|
|
39916
39894
|
const { sourceDirectory, getCanonicalFileName } = info;
|
|
39917
39895
|
const relativePath = rootDirs && tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName, ending, compilerOptions) || removeExtensionAndIndexPostFix(ensurePathIsNonModuleName(getRelativePathFromDirectory(sourceDirectory, moduleFileName, getCanonicalFileName)), ending, compilerOptions);
|
|
39918
39896
|
if (!baseUrl && !paths || relativePreference === 0 /* Relative */) {
|
|
39919
|
-
return relativePath;
|
|
39897
|
+
return pathsOnly ? void 0 : relativePath;
|
|
39920
39898
|
}
|
|
39921
39899
|
const baseDirectory = getNormalizedAbsolutePath(getPathsBasePath(compilerOptions, host) || baseUrl, host.getCurrentDirectory());
|
|
39922
39900
|
const relativeToBaseUrl = getRelativePathIfInDirectory(moduleFileName, baseDirectory, getCanonicalFileName);
|
|
39923
39901
|
if (!relativeToBaseUrl) {
|
|
39924
|
-
return relativePath;
|
|
39902
|
+
return pathsOnly ? void 0 : relativePath;
|
|
39925
39903
|
}
|
|
39926
39904
|
const fromPaths = paths && tryGetModuleNameFromPaths(relativeToBaseUrl, paths, getAllowedEndings(ending, compilerOptions, importMode), host, compilerOptions);
|
|
39905
|
+
if (pathsOnly) {
|
|
39906
|
+
return fromPaths;
|
|
39907
|
+
}
|
|
39927
39908
|
const maybeNonRelative = fromPaths === void 0 && baseUrl !== void 0 ? removeExtensionAndIndexPostFix(relativeToBaseUrl, ending, compilerOptions) : fromPaths;
|
|
39928
39909
|
if (!maybeNonRelative) {
|
|
39929
39910
|
return relativePath;
|
|
@@ -40429,7 +40410,7 @@ ${lanes.join("\n")}
|
|
|
40429
40410
|
function SymbolLinks() {
|
|
40430
40411
|
}
|
|
40431
40412
|
function NodeLinks() {
|
|
40432
|
-
this.flags = 0
|
|
40413
|
+
this.flags = 0 /* None */;
|
|
40433
40414
|
}
|
|
40434
40415
|
function getNodeId(node) {
|
|
40435
40416
|
if (!node.id) {
|
|
@@ -41274,7 +41255,7 @@ ${lanes.join("\n")}
|
|
|
41274
41255
|
function createSymbol(flags, name, checkFlags) {
|
|
41275
41256
|
symbolCount++;
|
|
41276
41257
|
const symbol = new Symbol46(flags | 33554432 /* Transient */, name);
|
|
41277
|
-
symbol.checkFlags = checkFlags || 0
|
|
41258
|
+
symbol.checkFlags = checkFlags || 0 /* None */;
|
|
41278
41259
|
return symbol;
|
|
41279
41260
|
}
|
|
41280
41261
|
function getExcludedSymbolFlags(flags) {
|
|
@@ -43585,7 +43566,7 @@ ${lanes.join("\n")}
|
|
|
43585
43566
|
function createOriginType(flags) {
|
|
43586
43567
|
return new Type27(checker, flags);
|
|
43587
43568
|
}
|
|
43588
|
-
function createIntrinsicType(kind, intrinsicName, objectFlags = 0) {
|
|
43569
|
+
function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) {
|
|
43589
43570
|
const type = createType(kind);
|
|
43590
43571
|
type.intrinsicName = intrinsicName;
|
|
43591
43572
|
type.objectFlags = objectFlags;
|
|
@@ -44080,25 +44061,22 @@ ${lanes.join("\n")}
|
|
|
44080
44061
|
const context = {
|
|
44081
44062
|
enclosingDeclaration,
|
|
44082
44063
|
flags: flags || 0 /* None */,
|
|
44083
|
-
tracker: tracker && tracker.trackSymbol ? tracker : {
|
|
44084
|
-
|
|
44085
|
-
|
|
44086
|
-
|
|
44087
|
-
|
|
44088
|
-
|
|
44089
|
-
getPackageJsonInfoCache: ()
|
|
44090
|
-
|
|
44091
|
-
|
|
44092
|
-
|
|
44093
|
-
|
|
44094
|
-
|
|
44095
|
-
|
|
44096
|
-
|
|
44097
|
-
|
|
44098
|
-
|
|
44099
|
-
readFile: host.readFile ? (fileName) => host.readFile(fileName) : void 0
|
|
44100
|
-
} : void 0
|
|
44101
|
-
},
|
|
44064
|
+
tracker: tracker && tracker.trackSymbol ? tracker : { trackSymbol: () => false, moduleResolverHost: flags & 134217728 /* DoNotIncludeSymbolChain */ ? {
|
|
44065
|
+
getCommonSourceDirectory: !!host.getCommonSourceDirectory ? () => host.getCommonSourceDirectory() : () => "",
|
|
44066
|
+
getCurrentDirectory: () => host.getCurrentDirectory(),
|
|
44067
|
+
getSymlinkCache: maybeBind(host, host.getSymlinkCache),
|
|
44068
|
+
getPackageJsonInfoCache: () => {
|
|
44069
|
+
var _a3;
|
|
44070
|
+
return (_a3 = host.getPackageJsonInfoCache) == null ? void 0 : _a3.call(host);
|
|
44071
|
+
},
|
|
44072
|
+
useCaseSensitiveFileNames: maybeBind(host, host.useCaseSensitiveFileNames),
|
|
44073
|
+
redirectTargetsMap: host.redirectTargetsMap,
|
|
44074
|
+
getProjectReferenceRedirect: (fileName) => host.getProjectReferenceRedirect(fileName),
|
|
44075
|
+
isSourceOfProjectReferenceRedirect: (fileName) => host.isSourceOfProjectReferenceRedirect(fileName),
|
|
44076
|
+
fileExists: (fileName) => host.fileExists(fileName),
|
|
44077
|
+
getFileIncludeReasons: () => host.getFileIncludeReasons(),
|
|
44078
|
+
readFile: host.readFile ? (fileName) => host.readFile(fileName) : void 0
|
|
44079
|
+
} : void 0 },
|
|
44102
44080
|
encounteredError: false,
|
|
44103
44081
|
reportedDiagnostic: false,
|
|
44104
44082
|
visitedTypes: void 0,
|
|
@@ -45455,8 +45433,7 @@ ${lanes.join("\n")}
|
|
|
45455
45433
|
if (isSingleOrDoubleQuote(firstChar) && some(symbol2.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {
|
|
45456
45434
|
return factory.createStringLiteral(getSpecifierForModuleSymbol(symbol2, context));
|
|
45457
45435
|
}
|
|
45458
|
-
|
|
45459
|
-
if (index === 0 || canUsePropertyAccess) {
|
|
45436
|
+
if (index === 0 || canUsePropertyAccess(symbolName2, languageVersion)) {
|
|
45460
45437
|
const identifier = setEmitFlags(factory.createIdentifier(symbolName2, typeParameterNodes), 16777216 /* NoAsciiEscaping */);
|
|
45461
45438
|
identifier.symbol = symbol2;
|
|
45462
45439
|
return index > 0 ? factory.createPropertyAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), identifier) : identifier;
|
|
@@ -50429,7 +50406,7 @@ ${lanes.join("\n")}
|
|
|
50429
50406
|
function containsArgumentsReference(declaration) {
|
|
50430
50407
|
const links = getNodeLinks(declaration);
|
|
50431
50408
|
if (links.containsArgumentsReference === void 0) {
|
|
50432
|
-
if (links.flags &
|
|
50409
|
+
if (links.flags & 512 /* CaptureArguments */) {
|
|
50433
50410
|
links.containsArgumentsReference = true;
|
|
50434
50411
|
} else {
|
|
50435
50412
|
links.containsArgumentsReference = traverse(declaration.body);
|
|
@@ -54329,7 +54306,7 @@ ${lanes.join("\n")}
|
|
|
54329
54306
|
return compareSignaturesRelated(
|
|
54330
54307
|
source,
|
|
54331
54308
|
target,
|
|
54332
|
-
ignoreReturnTypes ? 4 /* IgnoreReturnTypes */ : 0
|
|
54309
|
+
ignoreReturnTypes ? 4 /* IgnoreReturnTypes */ : 0 /* None */,
|
|
54333
54310
|
false,
|
|
54334
54311
|
void 0,
|
|
54335
54312
|
void 0,
|
|
@@ -54563,7 +54540,9 @@ ${lanes.join("\n")}
|
|
|
54563
54540
|
if (relation === assignableRelation || relation === comparableRelation) {
|
|
54564
54541
|
if (s & 1 /* Any */)
|
|
54565
54542
|
return true;
|
|
54566
|
-
if (s &
|
|
54543
|
+
if (s & 8 /* Number */ && (t & 32 /* Enum */ || t & 256 /* NumberLiteral */ && t & 1024 /* EnumLiteral */))
|
|
54544
|
+
return true;
|
|
54545
|
+
if (s & 256 /* NumberLiteral */ && !(s & 1024 /* EnumLiteral */) && (t & 32 /* Enum */ || t & 256 /* NumberLiteral */ && t & 1024 /* EnumLiteral */ && source.value === target.value))
|
|
54567
54546
|
return true;
|
|
54568
54547
|
if (isUnknownLikeUnionType(target))
|
|
54569
54548
|
return true;
|
|
@@ -57512,24 +57491,7 @@ ${lanes.join("\n")}
|
|
|
57512
57491
|
return isFinite(n) && (!roundTripOnly || "" + n === s);
|
|
57513
57492
|
}
|
|
57514
57493
|
function parseBigIntLiteralType(text) {
|
|
57515
|
-
|
|
57516
|
-
const base10Value = parsePseudoBigInt(`${negative ? text.slice(1) : text}n`);
|
|
57517
|
-
return getBigIntLiteralType({ negative, base10Value });
|
|
57518
|
-
}
|
|
57519
|
-
function isValidBigIntString(s, roundTripOnly) {
|
|
57520
|
-
if (s === "")
|
|
57521
|
-
return false;
|
|
57522
|
-
const scanner2 = createScanner(99 /* ESNext */, false);
|
|
57523
|
-
let success = true;
|
|
57524
|
-
scanner2.setOnError(() => success = false);
|
|
57525
|
-
scanner2.setText(s + "n");
|
|
57526
|
-
let result = scanner2.scan();
|
|
57527
|
-
const negative = result === 40 /* MinusToken */;
|
|
57528
|
-
if (negative) {
|
|
57529
|
-
result = scanner2.scan();
|
|
57530
|
-
}
|
|
57531
|
-
const flags = scanner2.getTokenFlags();
|
|
57532
|
-
return success && result === 9 /* BigIntLiteral */ && scanner2.getTextPos() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) }));
|
|
57494
|
+
return getBigIntLiteralType(parseValidBigInt(text));
|
|
57533
57495
|
}
|
|
57534
57496
|
function isMemberOfStringMapping(source, target) {
|
|
57535
57497
|
if (target.flags & (4 /* String */ | 1 /* Any */)) {
|
|
@@ -57626,7 +57588,7 @@ ${lanes.join("\n")}
|
|
|
57626
57588
|
pos = p;
|
|
57627
57589
|
}
|
|
57628
57590
|
}
|
|
57629
|
-
function inferTypes(inferences, originalSource, originalTarget, priority = 0
|
|
57591
|
+
function inferTypes(inferences, originalSource, originalTarget, priority = 0 /* None */, contravariant = false) {
|
|
57630
57592
|
let bivariant = false;
|
|
57631
57593
|
let propagationType;
|
|
57632
57594
|
let inferencePriority = 2048 /* MaxValue */;
|
|
@@ -60068,8 +60030,8 @@ ${lanes.join("\n")}
|
|
|
60068
60030
|
}
|
|
60069
60031
|
const parent2 = getRootDeclaration(symbol.valueDeclaration).parent;
|
|
60070
60032
|
const links = getNodeLinks(parent2);
|
|
60071
|
-
if (!(links.flags &
|
|
60072
|
-
links.flags |=
|
|
60033
|
+
if (!(links.flags & 524288 /* AssignmentsMarked */)) {
|
|
60034
|
+
links.flags |= 524288 /* AssignmentsMarked */;
|
|
60073
60035
|
if (!hasParentWithAssignmentsMarked(parent2)) {
|
|
60074
60036
|
markNodeAssignments(parent2);
|
|
60075
60037
|
}
|
|
@@ -60077,7 +60039,7 @@ ${lanes.join("\n")}
|
|
|
60077
60039
|
return symbol.isAssigned || false;
|
|
60078
60040
|
}
|
|
60079
60041
|
function hasParentWithAssignmentsMarked(node) {
|
|
60080
|
-
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags &
|
|
60042
|
+
return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 524288 /* AssignmentsMarked */));
|
|
60081
60043
|
}
|
|
60082
60044
|
function markNodeAssignments(node) {
|
|
60083
60045
|
if (node.kind === 79 /* Identifier */) {
|
|
@@ -60156,11 +60118,11 @@ ${lanes.join("\n")}
|
|
|
60156
60118
|
const parent2 = declaration.parent.parent;
|
|
60157
60119
|
if (parent2.kind === 257 /* VariableDeclaration */ && getCombinedNodeFlags(declaration) & 2 /* Const */ || parent2.kind === 166 /* Parameter */) {
|
|
60158
60120
|
const links = getNodeLinks(parent2);
|
|
60159
|
-
if (!(links.flags &
|
|
60160
|
-
links.flags |=
|
|
60121
|
+
if (!(links.flags & 16777216 /* InCheckIdentifier */)) {
|
|
60122
|
+
links.flags |= 16777216 /* InCheckIdentifier */;
|
|
60161
60123
|
const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */);
|
|
60162
60124
|
const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType);
|
|
60163
|
-
links.flags &= ~
|
|
60125
|
+
links.flags &= ~16777216 /* InCheckIdentifier */;
|
|
60164
60126
|
if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 166 /* Parameter */ && isSymbolAssigned(symbol))) {
|
|
60165
60127
|
const pattern = declaration.parent;
|
|
60166
60128
|
const narrowedType = getFlowTypeOfReference(pattern, parentTypeConstraint, parentTypeConstraint, void 0, location.flowNode);
|
|
@@ -60210,7 +60172,7 @@ ${lanes.join("\n")}
|
|
|
60210
60172
|
error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method);
|
|
60211
60173
|
}
|
|
60212
60174
|
}
|
|
60213
|
-
getNodeLinks(container).flags |=
|
|
60175
|
+
getNodeLinks(container).flags |= 512 /* CaptureArguments */;
|
|
60214
60176
|
return getTypeOfSymbol(symbol);
|
|
60215
60177
|
}
|
|
60216
60178
|
if (shouldMarkIdentifierAliasReferenced(node)) {
|
|
@@ -60227,8 +60189,8 @@ ${lanes.join("\n")}
|
|
|
60227
60189
|
let container = getContainingClass(node);
|
|
60228
60190
|
while (container !== void 0) {
|
|
60229
60191
|
if (container === declaration && container.name !== node) {
|
|
60230
|
-
getNodeLinks(declaration).flags |=
|
|
60231
|
-
getNodeLinks(node).flags |=
|
|
60192
|
+
getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */;
|
|
60193
|
+
getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */;
|
|
60232
60194
|
break;
|
|
60233
60195
|
}
|
|
60234
60196
|
container = getContainingClass(container);
|
|
@@ -60238,8 +60200,8 @@ ${lanes.join("\n")}
|
|
|
60238
60200
|
while (container.kind !== 308 /* SourceFile */) {
|
|
60239
60201
|
if (container.parent === declaration) {
|
|
60240
60202
|
if (isPropertyDeclaration(container) && isStatic(container) || isClassStaticBlockDeclaration(container)) {
|
|
60241
|
-
getNodeLinks(declaration).flags |=
|
|
60242
|
-
getNodeLinks(node).flags |=
|
|
60203
|
+
getNodeLinks(declaration).flags |= 1048576 /* ClassWithConstructorReference */;
|
|
60204
|
+
getNodeLinks(node).flags |= 2097152 /* ConstructorReferenceInClass */;
|
|
60243
60205
|
}
|
|
60244
60206
|
break;
|
|
60245
60207
|
}
|
|
@@ -60353,7 +60315,7 @@ ${lanes.join("\n")}
|
|
|
60353
60315
|
const part = getPartOfForStatementContainingNode(node.parent, container);
|
|
60354
60316
|
if (part) {
|
|
60355
60317
|
const links = getNodeLinks(part);
|
|
60356
|
-
links.flags |=
|
|
60318
|
+
links.flags |= 8192 /* ContainsCapturedBlockScopeBinding */;
|
|
60357
60319
|
const capturedBindings = links.capturedBlockScopeBindings || (links.capturedBlockScopeBindings = []);
|
|
60358
60320
|
pushIfUnique(capturedBindings, symbol);
|
|
60359
60321
|
if (part === container.initializer) {
|
|
@@ -60363,19 +60325,19 @@ ${lanes.join("\n")}
|
|
|
60363
60325
|
}
|
|
60364
60326
|
}
|
|
60365
60327
|
if (capturesBlockScopeBindingInLoopBody) {
|
|
60366
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
60328
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
60367
60329
|
}
|
|
60368
60330
|
}
|
|
60369
60331
|
if (isForStatement(container)) {
|
|
60370
60332
|
const varDeclList = getAncestor(symbol.valueDeclaration, 258 /* VariableDeclarationList */);
|
|
60371
60333
|
if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) {
|
|
60372
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
60334
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 262144 /* NeedsLoopOutParameter */;
|
|
60373
60335
|
}
|
|
60374
60336
|
}
|
|
60375
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
60337
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
60376
60338
|
}
|
|
60377
60339
|
if (isCaptured) {
|
|
60378
|
-
getNodeLinks(symbol.valueDeclaration).flags |=
|
|
60340
|
+
getNodeLinks(symbol.valueDeclaration).flags |= 16384 /* CapturedBlockScopedBinding */;
|
|
60379
60341
|
}
|
|
60380
60342
|
}
|
|
60381
60343
|
function isBindingCapturedByNode(node, decl) {
|
|
@@ -60592,23 +60554,23 @@ ${lanes.join("\n")}
|
|
|
60592
60554
|
checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class);
|
|
60593
60555
|
}
|
|
60594
60556
|
if (isStatic(container) || isCallExpression2) {
|
|
60595
|
-
nodeCheckFlag =
|
|
60557
|
+
nodeCheckFlag = 32 /* SuperStatic */;
|
|
60596
60558
|
if (!isCallExpression2 && languageVersion >= 2 /* ES2015 */ && languageVersion <= 8 /* ES2021 */ && (isPropertyDeclaration(container) || isClassStaticBlockDeclaration(container))) {
|
|
60597
60559
|
forEachEnclosingBlockScopeContainer(node.parent, (current) => {
|
|
60598
60560
|
if (!isSourceFile(current) || isExternalOrCommonJsModule(current)) {
|
|
60599
|
-
getNodeLinks(current).flags |=
|
|
60561
|
+
getNodeLinks(current).flags |= 8388608 /* ContainsSuperPropertyInStaticInitializer */;
|
|
60600
60562
|
}
|
|
60601
60563
|
});
|
|
60602
60564
|
}
|
|
60603
60565
|
} else {
|
|
60604
|
-
nodeCheckFlag =
|
|
60566
|
+
nodeCheckFlag = 16 /* SuperInstance */;
|
|
60605
60567
|
}
|
|
60606
60568
|
getNodeLinks(node).flags |= nodeCheckFlag;
|
|
60607
60569
|
if (container.kind === 171 /* MethodDeclaration */ && inAsyncFunction) {
|
|
60608
60570
|
if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) {
|
|
60609
|
-
getNodeLinks(container).flags |=
|
|
60571
|
+
getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */;
|
|
60610
60572
|
} else {
|
|
60611
|
-
getNodeLinks(container).flags |=
|
|
60573
|
+
getNodeLinks(container).flags |= 128 /* MethodWithSuperPropertyAccessInAsync */;
|
|
60612
60574
|
}
|
|
60613
60575
|
}
|
|
60614
60576
|
if (needToCaptureLexicalThis) {
|
|
@@ -60636,7 +60598,7 @@ ${lanes.join("\n")}
|
|
|
60636
60598
|
error(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments);
|
|
60637
60599
|
return errorType;
|
|
60638
60600
|
}
|
|
60639
|
-
return nodeCheckFlag ===
|
|
60601
|
+
return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType);
|
|
60640
60602
|
function isLegalUsageOfSuperExpression(container2) {
|
|
60641
60603
|
if (!container2) {
|
|
60642
60604
|
return false;
|
|
@@ -61651,9 +61613,9 @@ ${lanes.join("\n")}
|
|
|
61651
61613
|
const container = getEnclosingBlockScopeContainer(node.parent.parent);
|
|
61652
61614
|
const enclosingIterationStatement = getEnclosingIterationStatement(container);
|
|
61653
61615
|
if (enclosingIterationStatement) {
|
|
61654
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
61655
|
-
getNodeLinks(node).flags |=
|
|
61656
|
-
getNodeLinks(node.parent.parent).flags |=
|
|
61616
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
61617
|
+
getNodeLinks(node).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
61618
|
+
getNodeLinks(node.parent.parent).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
61657
61619
|
}
|
|
61658
61620
|
}
|
|
61659
61621
|
if (links.resolvedType.flags & 98304 /* Nullable */ || !isTypeAssignableToKind(links.resolvedType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */) && !isTypeAssignableTo(links.resolvedType, stringNumberSymbolType)) {
|
|
@@ -65640,10 +65602,10 @@ ${lanes.join("\n")}
|
|
|
65640
65602
|
}
|
|
65641
65603
|
function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
|
|
65642
65604
|
const links = getNodeLinks(node);
|
|
65643
|
-
if (!(links.flags &
|
|
65605
|
+
if (!(links.flags & 64 /* ContextChecked */)) {
|
|
65644
65606
|
const contextualSignature = getContextualSignature(node);
|
|
65645
|
-
if (!(links.flags &
|
|
65646
|
-
links.flags |=
|
|
65607
|
+
if (!(links.flags & 64 /* ContextChecked */)) {
|
|
65608
|
+
links.flags |= 64 /* ContextChecked */;
|
|
65647
65609
|
const signature = firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfNode(node)), 0 /* Call */));
|
|
65648
65610
|
if (!signature) {
|
|
65649
65611
|
return;
|
|
@@ -67633,13 +67595,13 @@ ${lanes.join("\n")}
|
|
|
67633
67595
|
function setNodeLinksForPrivateIdentifierScope(node) {
|
|
67634
67596
|
if (isPrivateIdentifier(node.name) && languageVersion < 99 /* ESNext */) {
|
|
67635
67597
|
for (let lexicalScope = getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = getEnclosingBlockScopeContainer(lexicalScope)) {
|
|
67636
|
-
getNodeLinks(lexicalScope).flags |=
|
|
67598
|
+
getNodeLinks(lexicalScope).flags |= 4194304 /* ContainsClassWithPrivateIdentifiers */;
|
|
67637
67599
|
}
|
|
67638
67600
|
if (isClassExpression(node.parent)) {
|
|
67639
67601
|
const enclosingIterationStatement = getEnclosingIterationStatement(node.parent);
|
|
67640
67602
|
if (enclosingIterationStatement) {
|
|
67641
|
-
getNodeLinks(node.name).flags |=
|
|
67642
|
-
getNodeLinks(enclosingIterationStatement).flags |=
|
|
67603
|
+
getNodeLinks(node.name).flags |= 32768 /* BlockScopedBindingInLoop */;
|
|
67604
|
+
getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */;
|
|
67643
67605
|
}
|
|
67644
67606
|
}
|
|
67645
67607
|
}
|
|
@@ -69234,7 +69196,7 @@ ${lanes.join("\n")}
|
|
|
69234
69196
|
}
|
|
69235
69197
|
function checkWeakMapSetCollision(node) {
|
|
69236
69198
|
const enclosingBlockScope = getEnclosingBlockScopeContainer(node);
|
|
69237
|
-
if (getNodeCheckFlags(enclosingBlockScope) &
|
|
69199
|
+
if (getNodeCheckFlags(enclosingBlockScope) & 4194304 /* ContainsClassWithPrivateIdentifiers */) {
|
|
69238
69200
|
Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name) && typeof node.name.escapedText === "string", "The target of a WeakMap/WeakSet collision check should be an identifier");
|
|
69239
69201
|
errorSkippedOn("noEmit", node, Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, node.name.escapedText);
|
|
69240
69202
|
}
|
|
@@ -69248,18 +69210,18 @@ ${lanes.join("\n")}
|
|
|
69248
69210
|
let hasCollision = false;
|
|
69249
69211
|
if (isClassExpression(node)) {
|
|
69250
69212
|
for (const member of node.members) {
|
|
69251
|
-
if (getNodeCheckFlags(member) &
|
|
69213
|
+
if (getNodeCheckFlags(member) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
69252
69214
|
hasCollision = true;
|
|
69253
69215
|
break;
|
|
69254
69216
|
}
|
|
69255
69217
|
}
|
|
69256
69218
|
} else if (isFunctionExpression(node)) {
|
|
69257
|
-
if (getNodeCheckFlags(node) &
|
|
69219
|
+
if (getNodeCheckFlags(node) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
69258
69220
|
hasCollision = true;
|
|
69259
69221
|
}
|
|
69260
69222
|
} else {
|
|
69261
69223
|
const container = getEnclosingBlockScopeContainer(node);
|
|
69262
|
-
if (container && getNodeCheckFlags(container) &
|
|
69224
|
+
if (container && getNodeCheckFlags(container) & 8388608 /* ContainsSuperPropertyInStaticInitializer */) {
|
|
69263
69225
|
hasCollision = true;
|
|
69264
69226
|
}
|
|
69265
69227
|
}
|
|
@@ -70474,8 +70436,9 @@ ${lanes.join("\n")}
|
|
|
70474
70436
|
});
|
|
70475
70437
|
const containsArguments = containsArgumentsReference(node);
|
|
70476
70438
|
if (containsArguments) {
|
|
70477
|
-
const
|
|
70478
|
-
|
|
70439
|
+
const lastJSDocParamIndex = jsdocParameters.length - 1;
|
|
70440
|
+
const lastJSDocParam = jsdocParameters[lastJSDocParamIndex];
|
|
70441
|
+
if (isJs && lastJSDocParam && isIdentifier(lastJSDocParam.name) && lastJSDocParam.typeExpression && lastJSDocParam.typeExpression.type && !parameters.has(lastJSDocParam.name.escapedText) && !excludedParameters.has(lastJSDocParamIndex) && !isArrayType(getTypeFromTypeNode(lastJSDocParam.typeExpression.type))) {
|
|
70479
70442
|
error(lastJSDocParam.name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, idText(lastJSDocParam.name));
|
|
70480
70443
|
}
|
|
70481
70444
|
} else {
|
|
@@ -71143,8 +71106,8 @@ ${lanes.join("\n")}
|
|
|
71143
71106
|
}
|
|
71144
71107
|
function computeEnumMemberValues(node) {
|
|
71145
71108
|
const nodeLinks2 = getNodeLinks(node);
|
|
71146
|
-
if (!(nodeLinks2.flags &
|
|
71147
|
-
nodeLinks2.flags |=
|
|
71109
|
+
if (!(nodeLinks2.flags & 1024 /* EnumValuesComputed */)) {
|
|
71110
|
+
nodeLinks2.flags |= 1024 /* EnumValuesComputed */;
|
|
71148
71111
|
let autoValue = 0;
|
|
71149
71112
|
for (const member of node.members) {
|
|
71150
71113
|
const value = computeMemberValue(member, autoValue);
|
|
@@ -71420,7 +71383,7 @@ ${lanes.join("\n")}
|
|
|
71420
71383
|
}
|
|
71421
71384
|
const mergedClass = getDeclarationOfKind(symbol, 260 /* ClassDeclaration */);
|
|
71422
71385
|
if (mergedClass && inSameLexicalScope(node, mergedClass)) {
|
|
71423
|
-
getNodeLinks(node).flags |=
|
|
71386
|
+
getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */;
|
|
71424
71387
|
}
|
|
71425
71388
|
}
|
|
71426
71389
|
if (isAmbientExternalModule) {
|
|
@@ -73051,8 +73014,8 @@ ${lanes.join("\n")}
|
|
|
73051
73014
|
const nodeLinks2 = getNodeLinks(symbol.valueDeclaration);
|
|
73052
73015
|
if (resolveName(container.parent, symbol.escapedName, 111551 /* Value */, void 0, void 0, false)) {
|
|
73053
73016
|
links.isDeclarationWithCollidingName = true;
|
|
73054
|
-
} else if (nodeLinks2.flags &
|
|
73055
|
-
const isDeclaredInLoop = nodeLinks2.flags &
|
|
73017
|
+
} else if (nodeLinks2.flags & 16384 /* CapturedBlockScopedBinding */) {
|
|
73018
|
+
const isDeclaredInLoop = nodeLinks2.flags & 32768 /* BlockScopedBindingInLoop */;
|
|
73056
73019
|
const inLoopInitializer = isIterationStatement(container, false);
|
|
73057
73020
|
const inLoopBodyBlock = container.kind === 238 /* Block */ && isIterationStatement(container.parent, false);
|
|
73058
73021
|
links.isDeclarationWithCollidingName = !isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || !inLoopInitializer && !inLoopBodyBlock);
|
|
@@ -75354,6 +75317,7 @@ ${lanes.join("\n")}
|
|
|
75354
75317
|
return CheckMode3;
|
|
75355
75318
|
})(CheckMode || {});
|
|
75356
75319
|
SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => {
|
|
75320
|
+
SignatureCheckMode3[SignatureCheckMode3["None"] = 0] = "None";
|
|
75357
75321
|
SignatureCheckMode3[SignatureCheckMode3["BivariantCallback"] = 1] = "BivariantCallback";
|
|
75358
75322
|
SignatureCheckMode3[SignatureCheckMode3["StrictCallback"] = 2] = "StrictCallback";
|
|
75359
75323
|
SignatureCheckMode3[SignatureCheckMode3["IgnoreReturnTypes"] = 4] = "IgnoreReturnTypes";
|
|
@@ -76627,10 +76591,10 @@ ${lanes.join("\n")}
|
|
|
76627
76591
|
nodeVisitor(node.initializer, visitor, isExpression)
|
|
76628
76592
|
);
|
|
76629
76593
|
},
|
|
76630
|
-
[308 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context,
|
|
76594
|
+
[308 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) {
|
|
76631
76595
|
return context.factory.updateSourceFile(
|
|
76632
76596
|
node,
|
|
76633
|
-
visitLexicalEnvironment(node.statements, visitor, context
|
|
76597
|
+
visitLexicalEnvironment(node.statements, visitor, context)
|
|
76634
76598
|
);
|
|
76635
76599
|
},
|
|
76636
76600
|
[353 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -80358,12 +80322,12 @@ ${lanes.join("\n")}
|
|
|
80358
80322
|
function visitClassExpressionInNewClassLexicalEnvironment(node, facts) {
|
|
80359
80323
|
const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */);
|
|
80360
80324
|
const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node);
|
|
80361
|
-
const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) &
|
|
80325
|
+
const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */;
|
|
80362
80326
|
let temp;
|
|
80363
80327
|
function createClassTempVar() {
|
|
80364
80328
|
const classCheckFlags = resolver.getNodeCheckFlags(node);
|
|
80365
|
-
const isClassWithConstructorReference2 = classCheckFlags &
|
|
80366
|
-
const requiresBlockScopedVar = classCheckFlags &
|
|
80329
|
+
const isClassWithConstructorReference2 = classCheckFlags & 1048576 /* ClassWithConstructorReference */;
|
|
80330
|
+
const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */;
|
|
80367
80331
|
return factory2.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, !!isClassWithConstructorReference2);
|
|
80368
80332
|
}
|
|
80369
80333
|
if (facts & 2 /* NeedsClassConstructorReference */) {
|
|
@@ -80876,7 +80840,7 @@ ${lanes.join("\n")}
|
|
|
80876
80840
|
}
|
|
80877
80841
|
function trySubstituteClassAlias(node) {
|
|
80878
80842
|
if (enabledSubstitutions & 1 /* ClassAliases */) {
|
|
80879
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
80843
|
+
if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) {
|
|
80880
80844
|
const declaration = resolver.getReferencedValueDeclaration(node);
|
|
80881
80845
|
if (declaration) {
|
|
80882
80846
|
const classAlias = classAliases[declaration.id];
|
|
@@ -80899,7 +80863,7 @@ ${lanes.join("\n")}
|
|
|
80899
80863
|
const alreadyTransformed = isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left);
|
|
80900
80864
|
if (!alreadyTransformed && !inlinable && shouldHoist) {
|
|
80901
80865
|
const generatedName = factory2.getGeneratedNameForNode(name);
|
|
80902
|
-
if (resolver.getNodeCheckFlags(name) &
|
|
80866
|
+
if (resolver.getNodeCheckFlags(name) & 32768 /* BlockScopedBindingInLoop */) {
|
|
80903
80867
|
addBlockScopedVariable(generatedName);
|
|
80904
80868
|
} else {
|
|
80905
80869
|
hoistVariableDeclaration(generatedName);
|
|
@@ -81048,7 +81012,7 @@ ${lanes.join("\n")}
|
|
|
81048
81012
|
const { className } = getPrivateIdentifierEnvironment();
|
|
81049
81013
|
const prefix = className ? { prefix: "_", node: className, suffix: "_" } : "_";
|
|
81050
81014
|
const identifier = typeof name === "object" ? factory2.getGeneratedNameForNode(name, 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */, prefix, suffix) : typeof name === "string" ? factory2.createUniqueName(name, 16 /* Optimistic */, prefix, suffix) : factory2.createTempVariable(void 0, true, prefix, suffix);
|
|
81051
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
81015
|
+
if (resolver.getNodeCheckFlags(node) & 32768 /* BlockScopedBindingInLoop */) {
|
|
81052
81016
|
addBlockScopedVariable(identifier);
|
|
81053
81017
|
} else {
|
|
81054
81018
|
hoistVariableDeclaration(identifier);
|
|
@@ -81932,7 +81896,7 @@ ${lanes.join("\n")}
|
|
|
81932
81896
|
}
|
|
81933
81897
|
}
|
|
81934
81898
|
function getClassAliasIfNeeded(node) {
|
|
81935
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
81899
|
+
if (resolver.getNodeCheckFlags(node) & 1048576 /* ClassWithConstructorReference */) {
|
|
81936
81900
|
enableSubstitutionForClassAliases();
|
|
81937
81901
|
const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : "default");
|
|
81938
81902
|
classAliases[getOriginalNodeId(node)] = classAlias;
|
|
@@ -81966,7 +81930,7 @@ ${lanes.join("\n")}
|
|
|
81966
81930
|
}
|
|
81967
81931
|
function trySubstituteClassAlias(node) {
|
|
81968
81932
|
if (classAliases) {
|
|
81969
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
81933
|
+
if (resolver.getNodeCheckFlags(node) & 2097152 /* ConstructorReferenceInClass */) {
|
|
81970
81934
|
const declaration = resolver.getReferencedValueDeclaration(node);
|
|
81971
81935
|
if (declaration) {
|
|
81972
81936
|
const classAlias = classAliases[declaration.id];
|
|
@@ -82007,7 +81971,7 @@ ${lanes.join("\n")}
|
|
|
82007
81971
|
let capturedSuperProperties;
|
|
82008
81972
|
let hasSuperElementAccess;
|
|
82009
81973
|
const substitutedSuperAccessors = [];
|
|
82010
|
-
let contextFlags = 0
|
|
81974
|
+
let contextFlags = 0 /* None */;
|
|
82011
81975
|
const previousOnEmitNode = context.onEmitNode;
|
|
82012
81976
|
const previousOnSubstituteNode = context.onSubstituteNode;
|
|
82013
81977
|
context.onEmitNode = onEmitNode;
|
|
@@ -82334,7 +82298,7 @@ ${lanes.join("\n")}
|
|
|
82334
82298
|
hasSuperElementAccess = false;
|
|
82335
82299
|
let updated = visitFunctionBody(node.body, visitor, context);
|
|
82336
82300
|
const originalMethod = getOriginalNode(node, isFunctionLikeDeclaration);
|
|
82337
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
82301
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */) && (getFunctionFlags(originalMethod) & 3 /* AsyncGenerator */) !== 3 /* AsyncGenerator */;
|
|
82338
82302
|
if (emitSuperHelpers) {
|
|
82339
82303
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
82340
82304
|
if (capturedSuperProperties.size) {
|
|
@@ -82345,9 +82309,9 @@ ${lanes.join("\n")}
|
|
|
82345
82309
|
updated = factory2.updateBlock(updated, statements);
|
|
82346
82310
|
}
|
|
82347
82311
|
if (hasSuperElementAccess) {
|
|
82348
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
82312
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
82349
82313
|
addEmitHelper(updated, advancedAsyncSuperHelper);
|
|
82350
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
82314
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
82351
82315
|
addEmitHelper(updated, asyncSuperHelper);
|
|
82352
82316
|
}
|
|
82353
82317
|
}
|
|
@@ -82362,7 +82326,7 @@ ${lanes.join("\n")}
|
|
|
82362
82326
|
const nodeType = original.type;
|
|
82363
82327
|
const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0;
|
|
82364
82328
|
const isArrowFunction2 = node.kind === 216 /* ArrowFunction */;
|
|
82365
|
-
const hasLexicalArguments = (resolver.getNodeCheckFlags(node) &
|
|
82329
|
+
const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0;
|
|
82366
82330
|
const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames;
|
|
82367
82331
|
enclosingFunctionParameterNames = /* @__PURE__ */ new Set();
|
|
82368
82332
|
for (const parameter of node.parameters) {
|
|
@@ -82389,7 +82353,7 @@ ${lanes.join("\n")}
|
|
|
82389
82353
|
)
|
|
82390
82354
|
);
|
|
82391
82355
|
insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
82392
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
82356
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
|
|
82393
82357
|
if (emitSuperHelpers) {
|
|
82394
82358
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
82395
82359
|
if (capturedSuperProperties.size) {
|
|
@@ -82401,9 +82365,9 @@ ${lanes.join("\n")}
|
|
|
82401
82365
|
const block = factory2.createBlock(statements, true);
|
|
82402
82366
|
setTextRange(block, node.body);
|
|
82403
82367
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
82404
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
82368
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
82405
82369
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
82406
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
82370
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
82407
82371
|
addEmitHelper(block, asyncSuperHelper);
|
|
82408
82372
|
}
|
|
82409
82373
|
}
|
|
@@ -82463,7 +82427,7 @@ ${lanes.join("\n")}
|
|
|
82463
82427
|
}
|
|
82464
82428
|
function onEmitNode(hint, node, emitCallback) {
|
|
82465
82429
|
if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
|
|
82466
|
-
const superContainerFlags = resolver.getNodeCheckFlags(node) & (
|
|
82430
|
+
const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
|
|
82467
82431
|
if (superContainerFlags !== enclosingSuperContainerFlags) {
|
|
82468
82432
|
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
|
|
82469
82433
|
enclosingSuperContainerFlags = superContainerFlags;
|
|
@@ -82539,7 +82503,7 @@ ${lanes.join("\n")}
|
|
|
82539
82503
|
return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */;
|
|
82540
82504
|
}
|
|
82541
82505
|
function createSuperElementAccessInAsyncMethod(argumentExpression, location) {
|
|
82542
|
-
if (enclosingSuperContainerFlags &
|
|
82506
|
+
if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
82543
82507
|
return setTextRange(
|
|
82544
82508
|
factory2.createPropertyAccessExpression(
|
|
82545
82509
|
factory2.createCallExpression(
|
|
@@ -82564,7 +82528,7 @@ ${lanes.join("\n")}
|
|
|
82564
82528
|
}
|
|
82565
82529
|
}
|
|
82566
82530
|
function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
82567
|
-
const hasBinding = (resolver.getNodeCheckFlags(node) &
|
|
82531
|
+
const hasBinding = (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) !== 0;
|
|
82568
82532
|
const accessors = [];
|
|
82569
82533
|
names.forEach((_, key) => {
|
|
82570
82534
|
const name = unescapeLeadingUnderscores(key);
|
|
@@ -83508,7 +83472,7 @@ ${lanes.join("\n")}
|
|
|
83508
83472
|
!!(hierarchyFacts & 1 /* HasLexicalThis */)
|
|
83509
83473
|
)
|
|
83510
83474
|
);
|
|
83511
|
-
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (
|
|
83475
|
+
const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */);
|
|
83512
83476
|
if (emitSuperHelpers) {
|
|
83513
83477
|
enableSubstitutionForAsyncMethodsWithSuper();
|
|
83514
83478
|
const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties);
|
|
@@ -83519,9 +83483,9 @@ ${lanes.join("\n")}
|
|
|
83519
83483
|
insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
|
|
83520
83484
|
const block = factory2.updateBlock(node.body, statements);
|
|
83521
83485
|
if (emitSuperHelpers && hasSuperElementAccess) {
|
|
83522
|
-
if (resolver.getNodeCheckFlags(node) &
|
|
83486
|
+
if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
83523
83487
|
addEmitHelper(block, advancedAsyncSuperHelper);
|
|
83524
|
-
} else if (resolver.getNodeCheckFlags(node) &
|
|
83488
|
+
} else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) {
|
|
83525
83489
|
addEmitHelper(block, asyncSuperHelper);
|
|
83526
83490
|
}
|
|
83527
83491
|
}
|
|
@@ -83631,7 +83595,7 @@ ${lanes.join("\n")}
|
|
|
83631
83595
|
}
|
|
83632
83596
|
function onEmitNode(hint, node, emitCallback) {
|
|
83633
83597
|
if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) {
|
|
83634
|
-
const superContainerFlags = resolver.getNodeCheckFlags(node) & (
|
|
83598
|
+
const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */);
|
|
83635
83599
|
if (superContainerFlags !== enclosingSuperContainerFlags) {
|
|
83636
83600
|
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
|
|
83637
83601
|
enclosingSuperContainerFlags = superContainerFlags;
|
|
@@ -83707,7 +83671,7 @@ ${lanes.join("\n")}
|
|
|
83707
83671
|
return kind === 260 /* ClassDeclaration */ || kind === 173 /* Constructor */ || kind === 171 /* MethodDeclaration */ || kind === 174 /* GetAccessor */ || kind === 175 /* SetAccessor */;
|
|
83708
83672
|
}
|
|
83709
83673
|
function createSuperElementAccessInAsyncMethod(argumentExpression, location) {
|
|
83710
|
-
if (enclosingSuperContainerFlags &
|
|
83674
|
+
if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) {
|
|
83711
83675
|
return setTextRange(
|
|
83712
83676
|
factory2.createPropertyAccessExpression(
|
|
83713
83677
|
factory2.createCallExpression(
|
|
@@ -86106,8 +86070,8 @@ ${lanes.join("\n")}
|
|
|
86106
86070
|
}
|
|
86107
86071
|
function shouldEmitExplicitInitializerForLetDeclaration(node) {
|
|
86108
86072
|
const flags = resolver.getNodeCheckFlags(node);
|
|
86109
|
-
const isCapturedInFunction = flags &
|
|
86110
|
-
const isDeclaredInLoop = flags &
|
|
86073
|
+
const isCapturedInFunction = flags & 16384 /* CapturedBlockScopedBinding */;
|
|
86074
|
+
const isDeclaredInLoop = flags & 32768 /* BlockScopedBindingInLoop */;
|
|
86111
86075
|
const emittedAsTopLevel = (hierarchyFacts & 64 /* TopLevel */) !== 0 || isCapturedInFunction && isDeclaredInLoop && (hierarchyFacts & 512 /* IterationStatementBlock */) !== 0;
|
|
86112
86076
|
const emitExplicitInitializer = !emittedAsTopLevel && (hierarchyFacts & 4096 /* ForInOrForOfStatement */) === 0 && (!resolver.isDeclarationWithCollidingName(node) || isDeclaredInLoop && !isCapturedInFunction && (hierarchyFacts & (2048 /* ForStatement */ | 4096 /* ForInOrForOfStatement */)) === 0);
|
|
86113
86077
|
return emitExplicitInitializer;
|
|
@@ -86468,7 +86432,7 @@ ${lanes.join("\n")}
|
|
|
86468
86432
|
return factory2.inlineExpressions(expressions);
|
|
86469
86433
|
}
|
|
86470
86434
|
function shouldConvertPartOfIterationStatement(node) {
|
|
86471
|
-
return (resolver.getNodeCheckFlags(node) &
|
|
86435
|
+
return (resolver.getNodeCheckFlags(node) & 8192 /* ContainsCapturedBlockScopeBinding */) !== 0;
|
|
86472
86436
|
}
|
|
86473
86437
|
function shouldConvertInitializerOfForStatement(node) {
|
|
86474
86438
|
return isForStatement(node) && !!node.initializer && shouldConvertPartOfIterationStatement(node.initializer);
|
|
@@ -86483,7 +86447,7 @@ ${lanes.join("\n")}
|
|
|
86483
86447
|
return shouldConvertBodyOfIterationStatement(node) || shouldConvertInitializerOfForStatement(node);
|
|
86484
86448
|
}
|
|
86485
86449
|
function shouldConvertBodyOfIterationStatement(node) {
|
|
86486
|
-
return (resolver.getNodeCheckFlags(node) &
|
|
86450
|
+
return (resolver.getNodeCheckFlags(node) & 4096 /* LoopWithCapturedBlockScopedBinding */) !== 0;
|
|
86487
86451
|
}
|
|
86488
86452
|
function hoistVariableDeclarationDeclaredInConvertedLoop(state, node) {
|
|
86489
86453
|
if (!state.hoistedLocalVariables) {
|
|
@@ -86944,10 +86908,10 @@ ${lanes.join("\n")}
|
|
|
86944
86908
|
} else {
|
|
86945
86909
|
loopParameters.push(factory2.createParameterDeclaration(void 0, void 0, name));
|
|
86946
86910
|
const checkFlags = resolver.getNodeCheckFlags(decl);
|
|
86947
|
-
if (checkFlags &
|
|
86911
|
+
if (checkFlags & 262144 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) {
|
|
86948
86912
|
const outParamName = factory2.createUniqueName("out_" + idText(name));
|
|
86949
|
-
let flags = 0
|
|
86950
|
-
if (checkFlags &
|
|
86913
|
+
let flags = 0 /* None */;
|
|
86914
|
+
if (checkFlags & 262144 /* NeedsLoopOutParameter */) {
|
|
86951
86915
|
flags |= 1 /* Body */;
|
|
86952
86916
|
}
|
|
86953
86917
|
if (isForStatement(container)) {
|
|
@@ -94939,7 +94903,7 @@ ${lanes.join("\n")}
|
|
|
94939
94903
|
const sourceMap = sourceMapGenerator.toString();
|
|
94940
94904
|
writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap, false, sourceFiles);
|
|
94941
94905
|
if (printer.bundleFileInfo)
|
|
94942
|
-
printer.bundleFileInfo.mapHash = computeSignature(sourceMap,
|
|
94906
|
+
printer.bundleFileInfo.mapHash = computeSignature(sourceMap, host);
|
|
94943
94907
|
}
|
|
94944
94908
|
} else {
|
|
94945
94909
|
writer.writeLine();
|
|
@@ -94947,7 +94911,7 @@ ${lanes.join("\n")}
|
|
|
94947
94911
|
const text = writer.getText();
|
|
94948
94912
|
writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos, diagnostics: transform2.diagnostics });
|
|
94949
94913
|
if (printer.bundleFileInfo)
|
|
94950
|
-
printer.bundleFileInfo.hash = computeSignature(text,
|
|
94914
|
+
printer.bundleFileInfo.hash = computeSignature(text, host);
|
|
94951
94915
|
writer.clear();
|
|
94952
94916
|
}
|
|
94953
94917
|
function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
|
|
@@ -95051,7 +95015,6 @@ ${lanes.join("\n")}
|
|
|
95051
95015
|
return result;
|
|
95052
95016
|
}
|
|
95053
95017
|
function emitUsingBuildInfoWorker(config, host, getCommandLine, customTransformers) {
|
|
95054
|
-
const createHash = maybeBind(host, host.createHash);
|
|
95055
95018
|
const { buildInfoPath, jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath } = getOutputPathsForBundle(config.options, false);
|
|
95056
95019
|
const buildInfo = host.getBuildInfo(buildInfoPath, config.options.configFilePath);
|
|
95057
95020
|
if (!buildInfo)
|
|
@@ -95061,22 +95024,22 @@ ${lanes.join("\n")}
|
|
|
95061
95024
|
const jsFileText = host.readFile(Debug.checkDefined(jsFilePath));
|
|
95062
95025
|
if (!jsFileText)
|
|
95063
95026
|
return jsFilePath;
|
|
95064
|
-
if (computeSignature(jsFileText,
|
|
95027
|
+
if (computeSignature(jsFileText, host) !== buildInfo.bundle.js.hash)
|
|
95065
95028
|
return jsFilePath;
|
|
95066
95029
|
const sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath);
|
|
95067
95030
|
if (sourceMapFilePath && !sourceMapText || config.options.inlineSourceMap)
|
|
95068
95031
|
return sourceMapFilePath || "inline sourcemap decoding";
|
|
95069
|
-
if (sourceMapFilePath && computeSignature(sourceMapText,
|
|
95032
|
+
if (sourceMapFilePath && computeSignature(sourceMapText, host) !== buildInfo.bundle.js.mapHash)
|
|
95070
95033
|
return sourceMapFilePath;
|
|
95071
95034
|
const declarationText = declarationFilePath && host.readFile(declarationFilePath);
|
|
95072
95035
|
if (declarationFilePath && !declarationText)
|
|
95073
95036
|
return declarationFilePath;
|
|
95074
|
-
if (declarationFilePath && computeSignature(declarationText,
|
|
95037
|
+
if (declarationFilePath && computeSignature(declarationText, host) !== buildInfo.bundle.dts.hash)
|
|
95075
95038
|
return declarationFilePath;
|
|
95076
95039
|
const declarationMapText = declarationMapPath && host.readFile(declarationMapPath);
|
|
95077
95040
|
if (declarationMapPath && !declarationMapText || config.options.inlineSourceMap)
|
|
95078
95041
|
return declarationMapPath || "inline sourcemap decoding";
|
|
95079
|
-
if (declarationMapPath && computeSignature(declarationMapText,
|
|
95042
|
+
if (declarationMapPath && computeSignature(declarationMapText, host) !== buildInfo.bundle.dts.mapHash)
|
|
95080
95043
|
return declarationMapPath;
|
|
95081
95044
|
const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
|
|
95082
95045
|
const ownPrependInput = createInputFilesWithFileTexts(
|
|
@@ -95146,7 +95109,7 @@ ${lanes.join("\n")}
|
|
|
95146
95109
|
getBuildInfo: (bundle) => {
|
|
95147
95110
|
const program = buildInfo.program;
|
|
95148
95111
|
if (program && changedDtsText !== void 0 && config.options.composite) {
|
|
95149
|
-
program.outSignature = computeSignature(changedDtsText,
|
|
95112
|
+
program.outSignature = computeSignature(changedDtsText, host, changedDtsData);
|
|
95150
95113
|
}
|
|
95151
95114
|
const { js, dts, sourceFiles } = buildInfo.bundle;
|
|
95152
95115
|
bundle.js.sources = js.sources;
|
|
@@ -95159,7 +95122,7 @@ ${lanes.join("\n")}
|
|
|
95159
95122
|
getSourceFileFromReference: returnUndefined,
|
|
95160
95123
|
redirectTargetsMap: createMultiMap(),
|
|
95161
95124
|
getFileIncludeReasons: notImplemented,
|
|
95162
|
-
createHash
|
|
95125
|
+
createHash: maybeBind(host, host.createHash)
|
|
95163
95126
|
};
|
|
95164
95127
|
emitFiles(
|
|
95165
95128
|
notImplementedResolver,
|
|
@@ -103354,7 +103317,7 @@ ${lanes.join("\n")}
|
|
|
103354
103317
|
return oldState && !oldState.referencedMap === !newReferencedMap;
|
|
103355
103318
|
}
|
|
103356
103319
|
BuilderState2.canReuseOldState = canReuseOldState;
|
|
103357
|
-
function create(newProgram,
|
|
103320
|
+
function create(newProgram, oldState, disableUseFileVersionAsSignature) {
|
|
103358
103321
|
var _a2, _b, _c;
|
|
103359
103322
|
const fileInfos = /* @__PURE__ */ new Map();
|
|
103360
103323
|
const options = newProgram.getCompilerOptions();
|
|
@@ -103362,6 +103325,7 @@ ${lanes.join("\n")}
|
|
|
103362
103325
|
const referencedMap = options.module !== 0 /* None */ && !isOutFile ? createManyToManyPathMap() : void 0;
|
|
103363
103326
|
const exportedModulesMap = referencedMap ? createManyToManyPathMap() : void 0;
|
|
103364
103327
|
const useOldState = canReuseOldState(referencedMap, oldState);
|
|
103328
|
+
const getCanonicalFileName = createGetCanonicalFileName(newProgram.useCaseSensitiveFileNames());
|
|
103365
103329
|
newProgram.getTypeChecker();
|
|
103366
103330
|
for (const sourceFile of newProgram.getSourceFiles()) {
|
|
103367
103331
|
const version2 = Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set");
|
|
@@ -103400,30 +103364,29 @@ ${lanes.join("\n")}
|
|
|
103400
103364
|
state.allFileNames = void 0;
|
|
103401
103365
|
}
|
|
103402
103366
|
BuilderState2.releaseCache = releaseCache2;
|
|
103403
|
-
function getFilesAffectedBy(state, programOfThisState, path, cancellationToken,
|
|
103367
|
+
function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, host) {
|
|
103404
103368
|
var _a2, _b;
|
|
103405
103369
|
const result = getFilesAffectedByWithOldState(
|
|
103406
103370
|
state,
|
|
103407
103371
|
programOfThisState,
|
|
103408
103372
|
path,
|
|
103409
103373
|
cancellationToken,
|
|
103410
|
-
|
|
103411
|
-
getCanonicalFileName
|
|
103374
|
+
host
|
|
103412
103375
|
);
|
|
103413
103376
|
(_a2 = state.oldSignatures) == null ? void 0 : _a2.clear();
|
|
103414
103377
|
(_b = state.oldExportedModulesMap) == null ? void 0 : _b.clear();
|
|
103415
103378
|
return result;
|
|
103416
103379
|
}
|
|
103417
103380
|
BuilderState2.getFilesAffectedBy = getFilesAffectedBy;
|
|
103418
|
-
function getFilesAffectedByWithOldState(state, programOfThisState, path, cancellationToken,
|
|
103381
|
+
function getFilesAffectedByWithOldState(state, programOfThisState, path, cancellationToken, host) {
|
|
103419
103382
|
const sourceFile = programOfThisState.getSourceFileByPath(path);
|
|
103420
103383
|
if (!sourceFile) {
|
|
103421
103384
|
return emptyArray;
|
|
103422
103385
|
}
|
|
103423
|
-
if (!updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken,
|
|
103386
|
+
if (!updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, host)) {
|
|
103424
103387
|
return [sourceFile];
|
|
103425
103388
|
}
|
|
103426
|
-
return (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, cancellationToken,
|
|
103389
|
+
return (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, cancellationToken, host);
|
|
103427
103390
|
}
|
|
103428
103391
|
BuilderState2.getFilesAffectedByWithOldState = getFilesAffectedByWithOldState;
|
|
103429
103392
|
function updateSignatureOfFile(state, signature, path) {
|
|
@@ -103431,7 +103394,7 @@ ${lanes.join("\n")}
|
|
|
103431
103394
|
(state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(path);
|
|
103432
103395
|
}
|
|
103433
103396
|
BuilderState2.updateSignatureOfFile = updateSignatureOfFile;
|
|
103434
|
-
function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken,
|
|
103397
|
+
function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, host, useFileVersionAsSignature = state.useFileVersionAsSignature) {
|
|
103435
103398
|
var _a2;
|
|
103436
103399
|
if ((_a2 = state.hasCalledUpdateShapeSignature) == null ? void 0 : _a2.has(sourceFile.resolvedPath))
|
|
103437
103400
|
return false;
|
|
@@ -103444,10 +103407,10 @@ ${lanes.join("\n")}
|
|
|
103444
103407
|
(fileName, text, _writeByteOrderMark, _onError, sourceFiles, data) => {
|
|
103445
103408
|
Debug.assert(isDeclarationFileName(fileName), `File extension for signature expected to be dts: Got:: ${fileName}`);
|
|
103446
103409
|
latestSignature = computeSignatureWithDiagnostics(
|
|
103410
|
+
programOfThisState,
|
|
103447
103411
|
sourceFile,
|
|
103448
103412
|
text,
|
|
103449
|
-
|
|
103450
|
-
getCanonicalFileName,
|
|
103413
|
+
host,
|
|
103451
103414
|
data
|
|
103452
103415
|
);
|
|
103453
103416
|
if (latestSignature !== prevSignature) {
|
|
@@ -103586,7 +103549,7 @@ ${lanes.join("\n")}
|
|
|
103586
103549
|
}
|
|
103587
103550
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
103588
103551
|
}
|
|
103589
|
-
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cancellationToken,
|
|
103552
|
+
function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cancellationToken, host) {
|
|
103590
103553
|
if (isFileAffectingGlobalScope(sourceFileWithUpdatedShape)) {
|
|
103591
103554
|
return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape);
|
|
103592
103555
|
}
|
|
@@ -103602,7 +103565,7 @@ ${lanes.join("\n")}
|
|
|
103602
103565
|
if (!seenFileNamesMap.has(currentPath)) {
|
|
103603
103566
|
const currentSourceFile = programOfThisState.getSourceFileByPath(currentPath);
|
|
103604
103567
|
seenFileNamesMap.set(currentPath, currentSourceFile);
|
|
103605
|
-
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cancellationToken,
|
|
103568
|
+
if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cancellationToken, host)) {
|
|
103606
103569
|
queue.push(...getReferencedByPaths(state, currentSourceFile.resolvedPath));
|
|
103607
103570
|
}
|
|
103608
103571
|
}
|
|
@@ -103646,9 +103609,9 @@ ${lanes.join("\n")}
|
|
|
103646
103609
|
function hasSameKeys(map1, map2) {
|
|
103647
103610
|
return map1 === map2 || map1 !== void 0 && map2 !== void 0 && map1.size === map2.size && !forEachKey(map1, (key) => !map2.has(key));
|
|
103648
103611
|
}
|
|
103649
|
-
function createBuilderProgramState(newProgram,
|
|
103612
|
+
function createBuilderProgramState(newProgram, oldState, disableUseFileVersionAsSignature) {
|
|
103650
103613
|
var _a2, _b;
|
|
103651
|
-
const state = BuilderState.create(newProgram,
|
|
103614
|
+
const state = BuilderState.create(newProgram, oldState, disableUseFileVersionAsSignature);
|
|
103652
103615
|
state.program = newProgram;
|
|
103653
103616
|
const compilerOptions = newProgram.getCompilerOptions();
|
|
103654
103617
|
state.compilerOptions = compilerOptions;
|
|
@@ -103692,7 +103655,7 @@ ${lanes.join("\n")}
|
|
|
103692
103655
|
return;
|
|
103693
103656
|
const diagnostics = oldState.semanticDiagnosticsPerFile.get(sourceFilePath);
|
|
103694
103657
|
if (diagnostics) {
|
|
103695
|
-
state.semanticDiagnosticsPerFile.set(sourceFilePath, oldState.hasReusableDiagnostic ? convertToDiagnostics(diagnostics, newProgram
|
|
103658
|
+
state.semanticDiagnosticsPerFile.set(sourceFilePath, oldState.hasReusableDiagnostic ? convertToDiagnostics(diagnostics, newProgram) : diagnostics);
|
|
103696
103659
|
if (!state.semanticDiagnosticsFromOldState) {
|
|
103697
103660
|
state.semanticDiagnosticsFromOldState = /* @__PURE__ */ new Set();
|
|
103698
103661
|
}
|
|
@@ -103752,10 +103715,11 @@ ${lanes.join("\n")}
|
|
|
103752
103715
|
function getEmitSignatureFromOldSignature(options, oldOptions, oldEmitSignature) {
|
|
103753
103716
|
return !!options.declarationMap === !!oldOptions.declarationMap ? oldEmitSignature : isString(oldEmitSignature) ? [oldEmitSignature] : oldEmitSignature[0];
|
|
103754
103717
|
}
|
|
103755
|
-
function convertToDiagnostics(diagnostics, newProgram
|
|
103718
|
+
function convertToDiagnostics(diagnostics, newProgram) {
|
|
103756
103719
|
if (!diagnostics.length)
|
|
103757
103720
|
return emptyArray;
|
|
103758
|
-
|
|
103721
|
+
let buildInfoDirectory;
|
|
103722
|
+
let getCanonicalFileName;
|
|
103759
103723
|
return diagnostics.map((diagnostic) => {
|
|
103760
103724
|
const result = convertToDiagnosticRelatedInformation(diagnostic, newProgram, toPath3);
|
|
103761
103725
|
result.reportsUnnecessary = diagnostic.reportsUnnecessary;
|
|
@@ -103767,7 +103731,8 @@ ${lanes.join("\n")}
|
|
|
103767
103731
|
return result;
|
|
103768
103732
|
});
|
|
103769
103733
|
function toPath3(path) {
|
|
103770
|
-
|
|
103734
|
+
buildInfoDirectory != null ? buildInfoDirectory : buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(newProgram.getCompilerOptions()), newProgram.getCurrentDirectory()));
|
|
103735
|
+
return toPath(path, buildInfoDirectory, getCanonicalFileName != null ? getCanonicalFileName : getCanonicalFileName = createGetCanonicalFileName(newProgram.useCaseSensitiveFileNames()));
|
|
103771
103736
|
}
|
|
103772
103737
|
}
|
|
103773
103738
|
function convertToDiagnosticRelatedInformation(diagnostic, newProgram, toPath3) {
|
|
@@ -103809,7 +103774,7 @@ ${lanes.join("\n")}
|
|
|
103809
103774
|
function assertSourceFileOkWithoutNextAffectedCall(state, sourceFile) {
|
|
103810
103775
|
Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath));
|
|
103811
103776
|
}
|
|
103812
|
-
function getNextAffectedFile(state, cancellationToken,
|
|
103777
|
+
function getNextAffectedFile(state, cancellationToken, host) {
|
|
103813
103778
|
var _a2, _b;
|
|
103814
103779
|
while (true) {
|
|
103815
103780
|
const { affectedFiles } = state;
|
|
@@ -103825,8 +103790,6 @@ ${lanes.join("\n")}
|
|
|
103825
103790
|
state,
|
|
103826
103791
|
affectedFile,
|
|
103827
103792
|
cancellationToken,
|
|
103828
|
-
computeHash,
|
|
103829
|
-
getCanonicalFileName,
|
|
103830
103793
|
host
|
|
103831
103794
|
);
|
|
103832
103795
|
return affectedFile;
|
|
@@ -103854,8 +103817,7 @@ ${lanes.join("\n")}
|
|
|
103854
103817
|
program,
|
|
103855
103818
|
nextKey.value,
|
|
103856
103819
|
cancellationToken,
|
|
103857
|
-
|
|
103858
|
-
getCanonicalFileName
|
|
103820
|
+
host
|
|
103859
103821
|
);
|
|
103860
103822
|
state.currentChangedFilePath = nextKey.value;
|
|
103861
103823
|
state.affectedFilesIndex = 0;
|
|
@@ -103907,7 +103869,7 @@ ${lanes.join("\n")}
|
|
|
103907
103869
|
);
|
|
103908
103870
|
}
|
|
103909
103871
|
}
|
|
103910
|
-
function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken,
|
|
103872
|
+
function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, host) {
|
|
103911
103873
|
removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
|
|
103912
103874
|
if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
|
|
103913
103875
|
removeDiagnosticsOfLibraryFiles(state);
|
|
@@ -103916,8 +103878,7 @@ ${lanes.join("\n")}
|
|
|
103916
103878
|
Debug.checkDefined(state.program),
|
|
103917
103879
|
affectedFile,
|
|
103918
103880
|
cancellationToken,
|
|
103919
|
-
|
|
103920
|
-
getCanonicalFileName
|
|
103881
|
+
host
|
|
103921
103882
|
);
|
|
103922
103883
|
return;
|
|
103923
103884
|
}
|
|
@@ -103927,12 +103888,10 @@ ${lanes.join("\n")}
|
|
|
103927
103888
|
state,
|
|
103928
103889
|
affectedFile,
|
|
103929
103890
|
cancellationToken,
|
|
103930
|
-
computeHash,
|
|
103931
|
-
getCanonicalFileName,
|
|
103932
103891
|
host
|
|
103933
103892
|
);
|
|
103934
103893
|
}
|
|
103935
|
-
function handleDtsMayChangeOf(state, path, cancellationToken,
|
|
103894
|
+
function handleDtsMayChangeOf(state, path, cancellationToken, host) {
|
|
103936
103895
|
removeSemanticDiagnosticsOf(state, path);
|
|
103937
103896
|
if (!state.changedFilesSet.has(path)) {
|
|
103938
103897
|
const program = Debug.checkDefined(state.program);
|
|
@@ -103943,8 +103902,7 @@ ${lanes.join("\n")}
|
|
|
103943
103902
|
program,
|
|
103944
103903
|
sourceFile,
|
|
103945
103904
|
cancellationToken,
|
|
103946
|
-
|
|
103947
|
-
getCanonicalFileName,
|
|
103905
|
+
host,
|
|
103948
103906
|
!host.disableUseFileVersionAsSignature
|
|
103949
103907
|
);
|
|
103950
103908
|
if (getEmitDeclarations(state.compilerOptions)) {
|
|
@@ -103966,7 +103924,7 @@ ${lanes.join("\n")}
|
|
|
103966
103924
|
const newSignature = Debug.checkDefined(state.fileInfos.get(path)).signature;
|
|
103967
103925
|
return newSignature !== oldSignature;
|
|
103968
103926
|
}
|
|
103969
|
-
function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken,
|
|
103927
|
+
function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, host) {
|
|
103970
103928
|
var _a2;
|
|
103971
103929
|
if (!((_a2 = state.fileInfos.get(filePath)) == null ? void 0 : _a2.affectsGlobalScope))
|
|
103972
103930
|
return false;
|
|
@@ -103974,14 +103932,12 @@ ${lanes.join("\n")}
|
|
|
103974
103932
|
state,
|
|
103975
103933
|
file.resolvedPath,
|
|
103976
103934
|
cancellationToken,
|
|
103977
|
-
computeHash,
|
|
103978
|
-
getCanonicalFileName,
|
|
103979
103935
|
host
|
|
103980
103936
|
));
|
|
103981
103937
|
removeDiagnosticsOfLibraryFiles(state);
|
|
103982
103938
|
return true;
|
|
103983
103939
|
}
|
|
103984
|
-
function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken,
|
|
103940
|
+
function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, host) {
|
|
103985
103941
|
var _a2;
|
|
103986
103942
|
if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath))
|
|
103987
103943
|
return;
|
|
@@ -103995,9 +103951,9 @@ ${lanes.join("\n")}
|
|
|
103995
103951
|
const currentPath = queue.pop();
|
|
103996
103952
|
if (!seenFileNamesMap.has(currentPath)) {
|
|
103997
103953
|
seenFileNamesMap.set(currentPath, true);
|
|
103998
|
-
if (handleDtsMayChangeOfGlobalScope(state, currentPath, cancellationToken,
|
|
103954
|
+
if (handleDtsMayChangeOfGlobalScope(state, currentPath, cancellationToken, host))
|
|
103999
103955
|
return;
|
|
104000
|
-
handleDtsMayChangeOf(state, currentPath, cancellationToken,
|
|
103956
|
+
handleDtsMayChangeOf(state, currentPath, cancellationToken, host);
|
|
104001
103957
|
if (isChangedSignature(state, currentPath)) {
|
|
104002
103958
|
const currentSourceFile = Debug.checkDefined(state.program).getSourceFileByPath(currentPath);
|
|
104003
103959
|
queue.push(...BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath));
|
|
@@ -104007,7 +103963,7 @@ ${lanes.join("\n")}
|
|
|
104007
103963
|
}
|
|
104008
103964
|
const seenFileAndExportsOfFile = /* @__PURE__ */ new Set();
|
|
104009
103965
|
(_a2 = state.exportedModulesMap.getKeys(affectedFile.resolvedPath)) == null ? void 0 : _a2.forEach((exportedFromPath) => {
|
|
104010
|
-
if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken,
|
|
103966
|
+
if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, host))
|
|
104011
103967
|
return true;
|
|
104012
103968
|
const references = state.referencedMap.getKeys(exportedFromPath);
|
|
104013
103969
|
return references && forEachKey(
|
|
@@ -104017,28 +103973,24 @@ ${lanes.join("\n")}
|
|
|
104017
103973
|
filePath,
|
|
104018
103974
|
seenFileAndExportsOfFile,
|
|
104019
103975
|
cancellationToken,
|
|
104020
|
-
computeHash,
|
|
104021
|
-
getCanonicalFileName,
|
|
104022
103976
|
host
|
|
104023
103977
|
)
|
|
104024
103978
|
);
|
|
104025
103979
|
});
|
|
104026
103980
|
}
|
|
104027
|
-
function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken,
|
|
103981
|
+
function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, host) {
|
|
104028
103982
|
var _a2, _b;
|
|
104029
103983
|
if (!tryAddToSet(seenFileAndExportsOfFile, filePath))
|
|
104030
103984
|
return void 0;
|
|
104031
|
-
if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken,
|
|
103985
|
+
if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, host))
|
|
104032
103986
|
return true;
|
|
104033
|
-
handleDtsMayChangeOf(state, filePath, cancellationToken,
|
|
103987
|
+
handleDtsMayChangeOf(state, filePath, cancellationToken, host);
|
|
104034
103988
|
(_a2 = state.exportedModulesMap.getKeys(filePath)) == null ? void 0 : _a2.forEach(
|
|
104035
103989
|
(exportedFromPath) => handleDtsMayChangeOfFileAndExportsOfFile(
|
|
104036
103990
|
state,
|
|
104037
103991
|
exportedFromPath,
|
|
104038
103992
|
seenFileAndExportsOfFile,
|
|
104039
103993
|
cancellationToken,
|
|
104040
|
-
computeHash,
|
|
104041
|
-
getCanonicalFileName,
|
|
104042
103994
|
host
|
|
104043
103995
|
)
|
|
104044
103996
|
);
|
|
@@ -104047,8 +103999,6 @@ ${lanes.join("\n")}
|
|
|
104047
103999
|
state,
|
|
104048
104000
|
referencingFilePath,
|
|
104049
104001
|
cancellationToken,
|
|
104050
|
-
computeHash,
|
|
104051
|
-
getCanonicalFileName,
|
|
104052
104002
|
host
|
|
104053
104003
|
)
|
|
104054
104004
|
);
|
|
@@ -104077,9 +104027,10 @@ ${lanes.join("\n")}
|
|
|
104077
104027
|
function isProgramBundleEmitBuildInfo(info) {
|
|
104078
104028
|
return !!outFile(info.options || {});
|
|
104079
104029
|
}
|
|
104080
|
-
function getBuildInfo2(state,
|
|
104030
|
+
function getBuildInfo2(state, bundle) {
|
|
104081
104031
|
var _a2, _b, _c;
|
|
104082
104032
|
const currentDirectory = Debug.checkDefined(state.program).getCurrentDirectory();
|
|
104033
|
+
const getCanonicalFileName = createGetCanonicalFileName(state.program.useCaseSensitiveFileNames());
|
|
104083
104034
|
const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
|
|
104084
104035
|
const latestChangedDtsFile = state.latestChangedDtsFile ? relativeToBuildInfoEnsuringAbsolutePath(state.latestChangedDtsFile) : void 0;
|
|
104085
104036
|
const fileNames = [];
|
|
@@ -104298,8 +104249,9 @@ ${lanes.join("\n")}
|
|
|
104298
104249
|
function getTextHandlingSourceMapForSignature(text, data) {
|
|
104299
104250
|
return (data == null ? void 0 : data.sourceMapUrlPos) !== void 0 ? text.substring(0, data.sourceMapUrlPos) : text;
|
|
104300
104251
|
}
|
|
104301
|
-
function computeSignatureWithDiagnostics(sourceFile, text,
|
|
104302
|
-
var _a2;
|
|
104252
|
+
function computeSignatureWithDiagnostics(program, sourceFile, text, host, data) {
|
|
104253
|
+
var _a2, _b;
|
|
104254
|
+
let getCanonicalFileName;
|
|
104303
104255
|
text = getTextHandlingSourceMapForSignature(text, data);
|
|
104304
104256
|
let sourceFileDirectory;
|
|
104305
104257
|
if ((_a2 = data == null ? void 0 : data.diagnostics) == null ? void 0 : _a2.length) {
|
|
@@ -104307,7 +104259,7 @@ ${lanes.join("\n")}
|
|
|
104307
104259
|
(diagnostic) => `${locationInfo(diagnostic)}${DiagnosticCategory[diagnostic.category]}${diagnostic.code}: ${flattenDiagnosticMessageText2(diagnostic.messageText)}`
|
|
104308
104260
|
).join("\n");
|
|
104309
104261
|
}
|
|
104310
|
-
return (
|
|
104262
|
+
return ((_b = host.createHash) != null ? _b : generateDjb2Hash)(text);
|
|
104311
104263
|
function flattenDiagnosticMessageText2(diagnostic) {
|
|
104312
104264
|
return isString(diagnostic) ? diagnostic : diagnostic === void 0 ? "" : !diagnostic.next ? diagnostic.messageText : diagnostic.messageText + diagnostic.next.map(flattenDiagnosticMessageText2).join("\n");
|
|
104313
104265
|
}
|
|
@@ -104316,11 +104268,16 @@ ${lanes.join("\n")}
|
|
|
104316
104268
|
return `(${diagnostic.start},${diagnostic.length})`;
|
|
104317
104269
|
if (sourceFileDirectory === void 0)
|
|
104318
104270
|
sourceFileDirectory = getDirectoryPath(sourceFile.resolvedPath);
|
|
104319
|
-
return `${ensurePathIsNonModuleName(getRelativePathFromDirectory(
|
|
104271
|
+
return `${ensurePathIsNonModuleName(getRelativePathFromDirectory(
|
|
104272
|
+
sourceFileDirectory,
|
|
104273
|
+
diagnostic.file.resolvedPath,
|
|
104274
|
+
getCanonicalFileName != null ? getCanonicalFileName : getCanonicalFileName = createGetCanonicalFileName(program.useCaseSensitiveFileNames())
|
|
104275
|
+
))}(${diagnostic.start},${diagnostic.length})`;
|
|
104320
104276
|
}
|
|
104321
104277
|
}
|
|
104322
|
-
function computeSignature(text,
|
|
104323
|
-
|
|
104278
|
+
function computeSignature(text, host, data) {
|
|
104279
|
+
var _a2;
|
|
104280
|
+
return ((_a2 = host.createHash) != null ? _a2 : generateDjb2Hash)(getTextHandlingSourceMapForSignature(text, data));
|
|
104324
104281
|
}
|
|
104325
104282
|
function createBuilderProgram(kind, { newProgram, host, oldProgram, configFileParsingDiagnostics }) {
|
|
104326
104283
|
let oldState = oldProgram && oldProgram.getState();
|
|
@@ -104329,10 +104286,8 @@ ${lanes.join("\n")}
|
|
|
104329
104286
|
oldState = void 0;
|
|
104330
104287
|
return oldProgram;
|
|
104331
104288
|
}
|
|
104332
|
-
const
|
|
104333
|
-
|
|
104334
|
-
const state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
|
|
104335
|
-
newProgram.getBuildInfo = (bundle) => getBuildInfo2(state, getCanonicalFileName, bundle);
|
|
104289
|
+
const state = createBuilderProgramState(newProgram, oldState, host.disableUseFileVersionAsSignature);
|
|
104290
|
+
newProgram.getBuildInfo = (bundle) => getBuildInfo2(state, bundle);
|
|
104336
104291
|
newProgram = void 0;
|
|
104337
104292
|
oldProgram = void 0;
|
|
104338
104293
|
oldState = void 0;
|
|
@@ -104366,7 +104321,7 @@ ${lanes.join("\n")}
|
|
|
104366
104321
|
}
|
|
104367
104322
|
function emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
|
|
104368
104323
|
var _a2, _b, _c, _d, _e;
|
|
104369
|
-
let affected = getNextAffectedFile(state, cancellationToken,
|
|
104324
|
+
let affected = getNextAffectedFile(state, cancellationToken, host);
|
|
104370
104325
|
const programEmitKind = getBuilderFileEmit(state.compilerOptions);
|
|
104371
104326
|
let emitKind = emitOnlyDtsFiles ? programEmitKind & 24 /* AllDts */ : programEmitKind;
|
|
104372
104327
|
if (!affected) {
|
|
@@ -104440,10 +104395,10 @@ ${lanes.join("\n")}
|
|
|
104440
104395
|
const info = state.fileInfos.get(file.resolvedPath);
|
|
104441
104396
|
if (info.signature === file.version) {
|
|
104442
104397
|
const signature = computeSignatureWithDiagnostics(
|
|
104398
|
+
state.program,
|
|
104443
104399
|
file,
|
|
104444
104400
|
text,
|
|
104445
|
-
|
|
104446
|
-
getCanonicalFileName,
|
|
104401
|
+
host,
|
|
104447
104402
|
data
|
|
104448
104403
|
);
|
|
104449
104404
|
if (!((_a2 = data == null ? void 0 : data.diagnostics) == null ? void 0 : _a2.length))
|
|
@@ -104487,7 +104442,7 @@ ${lanes.join("\n")}
|
|
|
104487
104442
|
state.program.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
104488
104443
|
function handleNewSignature(oldSignatureFormat, newSignature) {
|
|
104489
104444
|
const oldSignature = !oldSignatureFormat || isString(oldSignatureFormat) ? oldSignatureFormat : oldSignatureFormat[0];
|
|
104490
|
-
newSignature != null ? newSignature : newSignature = computeSignature(text,
|
|
104445
|
+
newSignature != null ? newSignature : newSignature = computeSignature(text, host, data);
|
|
104491
104446
|
if (newSignature === oldSignature) {
|
|
104492
104447
|
if (oldSignatureFormat === oldSignature)
|
|
104493
104448
|
return void 0;
|
|
@@ -104543,7 +104498,7 @@ ${lanes.join("\n")}
|
|
|
104543
104498
|
}
|
|
104544
104499
|
function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
|
|
104545
104500
|
while (true) {
|
|
104546
|
-
const affected = getNextAffectedFile(state, cancellationToken,
|
|
104501
|
+
const affected = getNextAffectedFile(state, cancellationToken, host);
|
|
104547
104502
|
let result;
|
|
104548
104503
|
if (!affected)
|
|
104549
104504
|
return void 0;
|
|
@@ -116412,6 +116367,7 @@ ${lanes.join("\n")}
|
|
|
116412
116367
|
trace: maybeBind(host, host.trace),
|
|
116413
116368
|
resolveModuleNames: maybeBind(host, host.resolveModuleNames),
|
|
116414
116369
|
getModuleResolutionCache: maybeBind(host, host.getModuleResolutionCache),
|
|
116370
|
+
createHash: maybeBind(host, host.createHash),
|
|
116415
116371
|
resolveTypeReferenceDirectives: maybeBind(host, host.resolveTypeReferenceDirectives),
|
|
116416
116372
|
useSourceOfProjectReferenceRedirect: maybeBind(host, host.useSourceOfProjectReferenceRedirect),
|
|
116417
116373
|
getParsedCommandLine
|
|
@@ -129579,6 +129535,13 @@ ${lanes.join("\n")}
|
|
|
129579
129535
|
if (!isChecked) {
|
|
129580
129536
|
getJSCompletionEntries(sourceFile, location.pos, uniqueNames, getEmitScriptTarget(compilerOptions), entries);
|
|
129581
129537
|
}
|
|
129538
|
+
let caseBlock;
|
|
129539
|
+
if (preferences.includeCompletionsWithInsertText && contextToken && (caseBlock = findAncestor(contextToken, isCaseBlock))) {
|
|
129540
|
+
const cases = getExhaustiveCaseSnippets(caseBlock, sourceFile, preferences, compilerOptions, host, program, formatContext);
|
|
129541
|
+
if (cases) {
|
|
129542
|
+
entries.push(cases.entry);
|
|
129543
|
+
}
|
|
129544
|
+
}
|
|
129582
129545
|
return {
|
|
129583
129546
|
flags: completionData.flags,
|
|
129584
129547
|
isGlobalCompletion: isInSnippetScope,
|
|
@@ -129592,6 +129555,190 @@ ${lanes.join("\n")}
|
|
|
129592
129555
|
function isCheckedFile(sourceFile, compilerOptions) {
|
|
129593
129556
|
return !isSourceFileJS(sourceFile) || !!isCheckJsEnabledForFile(sourceFile, compilerOptions);
|
|
129594
129557
|
}
|
|
129558
|
+
function getExhaustiveCaseSnippets(caseBlock, sourceFile, preferences, options, host, program, formatContext) {
|
|
129559
|
+
const clauses = caseBlock.clauses;
|
|
129560
|
+
const checker = program.getTypeChecker();
|
|
129561
|
+
const switchType = checker.getTypeAtLocation(caseBlock.parent.expression);
|
|
129562
|
+
if (switchType && switchType.isUnion() && every(switchType.types, (type) => type.isLiteral())) {
|
|
129563
|
+
const tracker = newCaseClauseTracker(checker, clauses);
|
|
129564
|
+
const target = getEmitScriptTarget(options);
|
|
129565
|
+
const quotePreference = getQuotePreference(sourceFile, preferences);
|
|
129566
|
+
const importAdder = ts_codefix_exports.createImportAdder(sourceFile, program, preferences, host);
|
|
129567
|
+
const elements = [];
|
|
129568
|
+
for (const type of switchType.types) {
|
|
129569
|
+
if (type.flags & 1024 /* EnumLiteral */) {
|
|
129570
|
+
Debug.assert(type.symbol, "An enum member type should have a symbol");
|
|
129571
|
+
Debug.assert(type.symbol.parent, "An enum member type should have a parent symbol (the enum symbol)");
|
|
129572
|
+
const enumValue = type.symbol.valueDeclaration && checker.getConstantValue(type.symbol.valueDeclaration);
|
|
129573
|
+
if (enumValue !== void 0) {
|
|
129574
|
+
if (tracker.hasValue(enumValue)) {
|
|
129575
|
+
continue;
|
|
129576
|
+
}
|
|
129577
|
+
tracker.addValue(enumValue);
|
|
129578
|
+
}
|
|
129579
|
+
const typeNode = ts_codefix_exports.typeToAutoImportableTypeNode(checker, importAdder, type, caseBlock, target);
|
|
129580
|
+
if (!typeNode) {
|
|
129581
|
+
return void 0;
|
|
129582
|
+
}
|
|
129583
|
+
const expr = typeNodeToExpression(typeNode, target, quotePreference);
|
|
129584
|
+
if (!expr) {
|
|
129585
|
+
return void 0;
|
|
129586
|
+
}
|
|
129587
|
+
elements.push(expr);
|
|
129588
|
+
} else if (!tracker.hasValue(type.value)) {
|
|
129589
|
+
switch (typeof type.value) {
|
|
129590
|
+
case "object":
|
|
129591
|
+
elements.push(factory.createBigIntLiteral(type.value));
|
|
129592
|
+
break;
|
|
129593
|
+
case "number":
|
|
129594
|
+
elements.push(factory.createNumericLiteral(type.value));
|
|
129595
|
+
break;
|
|
129596
|
+
case "string":
|
|
129597
|
+
elements.push(factory.createStringLiteral(type.value));
|
|
129598
|
+
break;
|
|
129599
|
+
}
|
|
129600
|
+
}
|
|
129601
|
+
}
|
|
129602
|
+
if (elements.length === 0) {
|
|
129603
|
+
return void 0;
|
|
129604
|
+
}
|
|
129605
|
+
const newClauses = map(elements, (element) => {
|
|
129606
|
+
return factory.createCaseClause(element, []);
|
|
129607
|
+
});
|
|
129608
|
+
const printer = createSnippetPrinter({
|
|
129609
|
+
removeComments: true,
|
|
129610
|
+
module: options.module,
|
|
129611
|
+
target: options.target,
|
|
129612
|
+
newLine: getNewLineKind(getNewLineCharacter(options, maybeBind(host, host.getNewLine)))
|
|
129613
|
+
});
|
|
129614
|
+
const insertText = formatContext ? printer.printAndFormatSnippetList(
|
|
129615
|
+
1 /* MultiLine */ | 131072 /* NoTrailingNewLine */,
|
|
129616
|
+
factory.createNodeArray(newClauses),
|
|
129617
|
+
sourceFile,
|
|
129618
|
+
formatContext
|
|
129619
|
+
) : printer.printSnippetList(
|
|
129620
|
+
1 /* MultiLine */ | 131072 /* NoTrailingNewLine */,
|
|
129621
|
+
factory.createNodeArray(newClauses),
|
|
129622
|
+
sourceFile
|
|
129623
|
+
);
|
|
129624
|
+
const firstClause = printer.printSnippetList(0 /* SingleLine */, factory.createNodeArray([first(newClauses)]), sourceFile);
|
|
129625
|
+
return {
|
|
129626
|
+
entry: {
|
|
129627
|
+
name: `${firstClause} ...`,
|
|
129628
|
+
kind: "" /* unknown */,
|
|
129629
|
+
sortText: SortText.GlobalsOrKeywords,
|
|
129630
|
+
insertText,
|
|
129631
|
+
hasAction: importAdder.hasFixes() || void 0,
|
|
129632
|
+
source: "SwitchCases/" /* SwitchCases */
|
|
129633
|
+
},
|
|
129634
|
+
importAdder
|
|
129635
|
+
};
|
|
129636
|
+
}
|
|
129637
|
+
return void 0;
|
|
129638
|
+
}
|
|
129639
|
+
function newCaseClauseTracker(checker, clauses) {
|
|
129640
|
+
const existingStrings = /* @__PURE__ */ new Set();
|
|
129641
|
+
const existingNumbers = /* @__PURE__ */ new Set();
|
|
129642
|
+
const existingBigInts = /* @__PURE__ */ new Set();
|
|
129643
|
+
for (const clause of clauses) {
|
|
129644
|
+
if (!isDefaultClause(clause)) {
|
|
129645
|
+
if (isLiteralExpression(clause.expression)) {
|
|
129646
|
+
const expression = clause.expression;
|
|
129647
|
+
switch (expression.kind) {
|
|
129648
|
+
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
129649
|
+
case 10 /* StringLiteral */:
|
|
129650
|
+
existingStrings.add(expression.text);
|
|
129651
|
+
break;
|
|
129652
|
+
case 8 /* NumericLiteral */:
|
|
129653
|
+
existingNumbers.add(parseInt(expression.text));
|
|
129654
|
+
break;
|
|
129655
|
+
case 9 /* BigIntLiteral */:
|
|
129656
|
+
const parsedBigInt = parseBigInt(endsWith(expression.text, "n") ? expression.text.slice(0, -1) : expression.text);
|
|
129657
|
+
if (parsedBigInt) {
|
|
129658
|
+
existingBigInts.add(pseudoBigIntToString(parsedBigInt));
|
|
129659
|
+
}
|
|
129660
|
+
break;
|
|
129661
|
+
}
|
|
129662
|
+
} else {
|
|
129663
|
+
const symbol = checker.getSymbolAtLocation(clause.expression);
|
|
129664
|
+
if (symbol && symbol.valueDeclaration && isEnumMember(symbol.valueDeclaration)) {
|
|
129665
|
+
const enumValue = checker.getConstantValue(symbol.valueDeclaration);
|
|
129666
|
+
if (enumValue !== void 0) {
|
|
129667
|
+
addValue(enumValue);
|
|
129668
|
+
}
|
|
129669
|
+
}
|
|
129670
|
+
}
|
|
129671
|
+
}
|
|
129672
|
+
}
|
|
129673
|
+
return {
|
|
129674
|
+
addValue,
|
|
129675
|
+
hasValue
|
|
129676
|
+
};
|
|
129677
|
+
function addValue(value) {
|
|
129678
|
+
switch (typeof value) {
|
|
129679
|
+
case "string":
|
|
129680
|
+
existingStrings.add(value);
|
|
129681
|
+
break;
|
|
129682
|
+
case "number":
|
|
129683
|
+
existingNumbers.add(value);
|
|
129684
|
+
}
|
|
129685
|
+
}
|
|
129686
|
+
function hasValue(value) {
|
|
129687
|
+
switch (typeof value) {
|
|
129688
|
+
case "string":
|
|
129689
|
+
return existingStrings.has(value);
|
|
129690
|
+
case "number":
|
|
129691
|
+
return existingNumbers.has(value);
|
|
129692
|
+
case "object":
|
|
129693
|
+
return existingBigInts.has(pseudoBigIntToString(value));
|
|
129694
|
+
}
|
|
129695
|
+
}
|
|
129696
|
+
}
|
|
129697
|
+
function typeNodeToExpression(typeNode, languageVersion, quotePreference) {
|
|
129698
|
+
switch (typeNode.kind) {
|
|
129699
|
+
case 180 /* TypeReference */:
|
|
129700
|
+
const typeName = typeNode.typeName;
|
|
129701
|
+
return entityNameToExpression(typeName, languageVersion, quotePreference);
|
|
129702
|
+
case 196 /* IndexedAccessType */:
|
|
129703
|
+
const objectExpression = typeNodeToExpression(typeNode.objectType, languageVersion, quotePreference);
|
|
129704
|
+
const indexExpression = typeNodeToExpression(typeNode.indexType, languageVersion, quotePreference);
|
|
129705
|
+
return objectExpression && indexExpression && factory.createElementAccessExpression(objectExpression, indexExpression);
|
|
129706
|
+
case 198 /* LiteralType */:
|
|
129707
|
+
const literal = typeNode.literal;
|
|
129708
|
+
switch (literal.kind) {
|
|
129709
|
+
case 10 /* StringLiteral */:
|
|
129710
|
+
return factory.createStringLiteral(literal.text, quotePreference === 0 /* Single */);
|
|
129711
|
+
case 8 /* NumericLiteral */:
|
|
129712
|
+
return factory.createNumericLiteral(literal.text, literal.numericLiteralFlags);
|
|
129713
|
+
}
|
|
129714
|
+
return void 0;
|
|
129715
|
+
case 193 /* ParenthesizedType */:
|
|
129716
|
+
const exp = typeNodeToExpression(typeNode.type, languageVersion, quotePreference);
|
|
129717
|
+
return exp && (isIdentifier(exp) ? exp : factory.createParenthesizedExpression(exp));
|
|
129718
|
+
case 183 /* TypeQuery */:
|
|
129719
|
+
return entityNameToExpression(typeNode.exprName, languageVersion, quotePreference);
|
|
129720
|
+
case 202 /* ImportType */:
|
|
129721
|
+
Debug.fail(`We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.`);
|
|
129722
|
+
}
|
|
129723
|
+
return void 0;
|
|
129724
|
+
}
|
|
129725
|
+
function entityNameToExpression(entityName, languageVersion, quotePreference) {
|
|
129726
|
+
if (isIdentifier(entityName)) {
|
|
129727
|
+
return entityName;
|
|
129728
|
+
}
|
|
129729
|
+
const realName = unescapeLeadingUnderscores(entityName.right.escapedText);
|
|
129730
|
+
if (canUsePropertyAccess(realName, languageVersion)) {
|
|
129731
|
+
return factory.createPropertyAccessExpression(
|
|
129732
|
+
entityNameToExpression(entityName.left, languageVersion, quotePreference),
|
|
129733
|
+
realName
|
|
129734
|
+
);
|
|
129735
|
+
} else {
|
|
129736
|
+
return factory.createElementAccessExpression(
|
|
129737
|
+
entityNameToExpression(entityName.left, languageVersion, quotePreference),
|
|
129738
|
+
factory.createStringLiteral(realName, quotePreference === 0 /* Single */)
|
|
129739
|
+
);
|
|
129740
|
+
}
|
|
129741
|
+
}
|
|
129595
129742
|
function isMemberCompletionKind(kind) {
|
|
129596
129743
|
switch (kind) {
|
|
129597
129744
|
case CompletionKind.ObjectPropertyDeclaration:
|
|
@@ -130250,6 +130397,9 @@ ${lanes.join("\n")}
|
|
|
130250
130397
|
return entries;
|
|
130251
130398
|
}
|
|
130252
130399
|
function getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences) {
|
|
130400
|
+
if (entryId.source === "SwitchCases/" /* SwitchCases */) {
|
|
130401
|
+
return { type: "cases" };
|
|
130402
|
+
}
|
|
130253
130403
|
if (entryId.data) {
|
|
130254
130404
|
const autoImport = getAutoImportSymbolFromCompletionEntryData(entryId.name, entryId.data, program, host);
|
|
130255
130405
|
if (autoImport) {
|
|
@@ -130288,9 +130438,9 @@ ${lanes.join("\n")}
|
|
|
130288
130438
|
const typeChecker = program.getTypeChecker();
|
|
130289
130439
|
const compilerOptions = program.getCompilerOptions();
|
|
130290
130440
|
const { name, source, data } = entryId;
|
|
130291
|
-
const contextToken =
|
|
130292
|
-
if (isInString(sourceFile, position,
|
|
130293
|
-
return ts_Completions_StringCompletions_exports.getStringLiteralCompletionDetails(name, sourceFile, position,
|
|
130441
|
+
const { previousToken, contextToken } = getRelevantTokens(position, sourceFile);
|
|
130442
|
+
if (isInString(sourceFile, position, previousToken)) {
|
|
130443
|
+
return ts_Completions_StringCompletions_exports.getStringLiteralCompletionDetails(name, sourceFile, position, previousToken, typeChecker, compilerOptions, host, cancellationToken, preferences);
|
|
130294
130444
|
}
|
|
130295
130445
|
const symbolCompletion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences);
|
|
130296
130446
|
switch (symbolCompletion.type) {
|
|
@@ -130310,14 +130460,40 @@ ${lanes.join("\n")}
|
|
|
130310
130460
|
}
|
|
130311
130461
|
}
|
|
130312
130462
|
case "symbol": {
|
|
130313
|
-
const { symbol, location, contextToken: contextToken2, origin, previousToken } = symbolCompletion;
|
|
130314
|
-
const { codeActions, sourceDisplay } = getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextToken2, origin, symbol, program, host, compilerOptions, sourceFile, position,
|
|
130463
|
+
const { symbol, location, contextToken: contextToken2, origin, previousToken: previousToken2 } = symbolCompletion;
|
|
130464
|
+
const { codeActions, sourceDisplay } = getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextToken2, origin, symbol, program, host, compilerOptions, sourceFile, position, previousToken2, formatContext, preferences, data, source, cancellationToken);
|
|
130315
130465
|
return createCompletionDetailsForSymbol(symbol, typeChecker, sourceFile, location, cancellationToken, codeActions, sourceDisplay);
|
|
130316
130466
|
}
|
|
130317
130467
|
case "literal": {
|
|
130318
130468
|
const { literal } = symbolCompletion;
|
|
130319
130469
|
return createSimpleDetails(completionNameForLiteral(sourceFile, preferences, literal), "string" /* string */, typeof literal === "string" ? 8 /* stringLiteral */ : 7 /* numericLiteral */);
|
|
130320
130470
|
}
|
|
130471
|
+
case "cases": {
|
|
130472
|
+
const { entry, importAdder } = getExhaustiveCaseSnippets(
|
|
130473
|
+
contextToken.parent,
|
|
130474
|
+
sourceFile,
|
|
130475
|
+
preferences,
|
|
130476
|
+
program.getCompilerOptions(),
|
|
130477
|
+
host,
|
|
130478
|
+
program,
|
|
130479
|
+
void 0
|
|
130480
|
+
);
|
|
130481
|
+
const changes = ts_textChanges_exports.ChangeTracker.with(
|
|
130482
|
+
{ host, formatContext, preferences },
|
|
130483
|
+
importAdder.writeFixes
|
|
130484
|
+
);
|
|
130485
|
+
return {
|
|
130486
|
+
name: entry.name,
|
|
130487
|
+
kind: "" /* unknown */,
|
|
130488
|
+
kindModifiers: "",
|
|
130489
|
+
displayParts: [],
|
|
130490
|
+
sourceDisplay: void 0,
|
|
130491
|
+
codeActions: [{
|
|
130492
|
+
changes,
|
|
130493
|
+
description: diagnosticToString([Diagnostics.Includes_imports_of_types_referenced_by_0, name])
|
|
130494
|
+
}]
|
|
130495
|
+
};
|
|
130496
|
+
}
|
|
130321
130497
|
case "none":
|
|
130322
130498
|
return allKeywordsCompletions().some((c) => c.name === name) ? createSimpleDetails(name, "keyword" /* keyword */, 5 /* keyword */) : void 0;
|
|
130323
130499
|
default:
|
|
@@ -132204,6 +132380,7 @@ ${lanes.join("\n")}
|
|
|
132204
132380
|
CompletionSource2["ClassMemberSnippet"] = "ClassMemberSnippet/";
|
|
132205
132381
|
CompletionSource2["TypeOnlyAlias"] = "TypeOnlyAlias/";
|
|
132206
132382
|
CompletionSource2["ObjectLiteralMethodSnippet"] = "ObjectLiteralMethodSnippet/";
|
|
132383
|
+
CompletionSource2["SwitchCases"] = "SwitchCases/";
|
|
132207
132384
|
return CompletionSource2;
|
|
132208
132385
|
})(CompletionSource || {});
|
|
132209
132386
|
SymbolOriginInfoKind = /* @__PURE__ */ ((SymbolOriginInfoKind2) => {
|
|
@@ -144672,6 +144849,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
144672
144849
|
init_ts4();
|
|
144673
144850
|
anyContext = emptyArray;
|
|
144674
144851
|
RuleAction = /* @__PURE__ */ ((RuleAction2) => {
|
|
144852
|
+
RuleAction2[RuleAction2["None"] = 0] = "None";
|
|
144675
144853
|
RuleAction2[RuleAction2["StopProcessingSpaceActions"] = 1] = "StopProcessingSpaceActions";
|
|
144676
144854
|
RuleAction2[RuleAction2["StopProcessingTokenActions"] = 2] = "StopProcessingTokenActions";
|
|
144677
144855
|
RuleAction2[RuleAction2["InsertSpace"] = 4] = "InsertSpace";
|
|
@@ -145327,7 +145505,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
145327
145505
|
return rulesMapCache;
|
|
145328
145506
|
}
|
|
145329
145507
|
function getRuleActionExclusion(ruleAction) {
|
|
145330
|
-
let mask2 = 0
|
|
145508
|
+
let mask2 = 0 /* None */;
|
|
145331
145509
|
if (ruleAction & 1 /* StopProcessingSpaceActions */) {
|
|
145332
145510
|
mask2 |= 28 /* ModifySpaceAction */;
|
|
145333
145511
|
}
|
|
@@ -146916,6 +147094,63 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
146916
147094
|
}
|
|
146917
147095
|
});
|
|
146918
147096
|
|
|
147097
|
+
// src/deprecatedCompat/deprecate.ts
|
|
147098
|
+
function getTypeScriptVersion() {
|
|
147099
|
+
return typeScriptVersion2 != null ? typeScriptVersion2 : typeScriptVersion2 = new Version(version);
|
|
147100
|
+
}
|
|
147101
|
+
function formatDeprecationMessage(name, error, errorAfter, since, message) {
|
|
147102
|
+
let deprecationMessage = error ? "DeprecationError: " : "DeprecationWarning: ";
|
|
147103
|
+
deprecationMessage += `'${name}' `;
|
|
147104
|
+
deprecationMessage += since ? `has been deprecated since v${since}` : "is deprecated";
|
|
147105
|
+
deprecationMessage += error ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : ".";
|
|
147106
|
+
deprecationMessage += message ? ` ${formatStringFromArgs(message, [name], 0)}` : "";
|
|
147107
|
+
return deprecationMessage;
|
|
147108
|
+
}
|
|
147109
|
+
function createErrorDeprecation(name, errorAfter, since, message) {
|
|
147110
|
+
const deprecationMessage = formatDeprecationMessage(name, true, errorAfter, since, message);
|
|
147111
|
+
return () => {
|
|
147112
|
+
throw new TypeError(deprecationMessage);
|
|
147113
|
+
};
|
|
147114
|
+
}
|
|
147115
|
+
function createWarningDeprecation(name, errorAfter, since, message) {
|
|
147116
|
+
let hasWrittenDeprecation = false;
|
|
147117
|
+
return () => {
|
|
147118
|
+
if (enableDeprecationWarnings && !hasWrittenDeprecation) {
|
|
147119
|
+
Debug.log.warn(formatDeprecationMessage(name, false, errorAfter, since, message));
|
|
147120
|
+
hasWrittenDeprecation = true;
|
|
147121
|
+
}
|
|
147122
|
+
};
|
|
147123
|
+
}
|
|
147124
|
+
function createDeprecation(name, options = {}) {
|
|
147125
|
+
var _a2, _b;
|
|
147126
|
+
const version2 = typeof options.typeScriptVersion === "string" ? new Version(options.typeScriptVersion) : (_a2 = options.typeScriptVersion) != null ? _a2 : getTypeScriptVersion();
|
|
147127
|
+
const errorAfter = typeof options.errorAfter === "string" ? new Version(options.errorAfter) : options.errorAfter;
|
|
147128
|
+
const warnAfter = typeof options.warnAfter === "string" ? new Version(options.warnAfter) : options.warnAfter;
|
|
147129
|
+
const since = typeof options.since === "string" ? new Version(options.since) : (_b = options.since) != null ? _b : warnAfter;
|
|
147130
|
+
const error = options.error || errorAfter && version2.compareTo(errorAfter) <= 0;
|
|
147131
|
+
const warn = !warnAfter || version2.compareTo(warnAfter) >= 0;
|
|
147132
|
+
return error ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop;
|
|
147133
|
+
}
|
|
147134
|
+
function wrapFunction(deprecation, func) {
|
|
147135
|
+
return function() {
|
|
147136
|
+
deprecation();
|
|
147137
|
+
return func.apply(this, arguments);
|
|
147138
|
+
};
|
|
147139
|
+
}
|
|
147140
|
+
function deprecate(func, options) {
|
|
147141
|
+
var _a2;
|
|
147142
|
+
const deprecation = createDeprecation((_a2 = options == null ? void 0 : options.name) != null ? _a2 : Debug.getFunctionName(func), options);
|
|
147143
|
+
return wrapFunction(deprecation, func);
|
|
147144
|
+
}
|
|
147145
|
+
var enableDeprecationWarnings, typeScriptVersion2;
|
|
147146
|
+
var init_deprecate = __esm({
|
|
147147
|
+
"src/deprecatedCompat/deprecate.ts"() {
|
|
147148
|
+
"use strict";
|
|
147149
|
+
init_ts5();
|
|
147150
|
+
enableDeprecationWarnings = true;
|
|
147151
|
+
}
|
|
147152
|
+
});
|
|
147153
|
+
|
|
146919
147154
|
// src/deprecatedCompat/deprecations.ts
|
|
146920
147155
|
function createOverload(name, overloads, binder2, deprecations) {
|
|
146921
147156
|
Object.defineProperty(call, "name", { ...Object.getOwnPropertyDescriptor(call, "name"), value: name });
|
|
@@ -146923,7 +147158,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
146923
147158
|
for (const key of Object.keys(deprecations)) {
|
|
146924
147159
|
const index = +key;
|
|
146925
147160
|
if (!isNaN(index) && hasProperty(overloads, `${index}`)) {
|
|
146926
|
-
overloads[index] =
|
|
147161
|
+
overloads[index] = deprecate(overloads[index], { ...deprecations[index], name });
|
|
146927
147162
|
}
|
|
146928
147163
|
}
|
|
146929
147164
|
}
|
|
@@ -146964,6 +147199,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
146964
147199
|
"src/deprecatedCompat/deprecations.ts"() {
|
|
146965
147200
|
"use strict";
|
|
146966
147201
|
init_ts5();
|
|
147202
|
+
init_deprecate();
|
|
146967
147203
|
}
|
|
146968
147204
|
});
|
|
146969
147205
|
|
|
@@ -146973,337 +147209,338 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
146973
147209
|
"src/deprecatedCompat/4.0/nodeFactoryTopLevelExports.ts"() {
|
|
146974
147210
|
"use strict";
|
|
146975
147211
|
init_ts5();
|
|
147212
|
+
init_deprecate();
|
|
146976
147213
|
factoryDeprecation = { since: "4.0", warnAfter: "4.1", message: "Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead." };
|
|
146977
|
-
createNodeArray =
|
|
146978
|
-
createNumericLiteral =
|
|
146979
|
-
createBigIntLiteral =
|
|
146980
|
-
createStringLiteral =
|
|
146981
|
-
createStringLiteralFromNode =
|
|
146982
|
-
createRegularExpressionLiteral =
|
|
146983
|
-
createLoopVariable =
|
|
146984
|
-
createUniqueName =
|
|
146985
|
-
createPrivateIdentifier =
|
|
146986
|
-
createSuper =
|
|
146987
|
-
createThis =
|
|
146988
|
-
createNull =
|
|
146989
|
-
createTrue =
|
|
146990
|
-
createFalse =
|
|
146991
|
-
createModifier =
|
|
146992
|
-
createModifiersFromModifierFlags =
|
|
146993
|
-
createQualifiedName =
|
|
146994
|
-
updateQualifiedName =
|
|
146995
|
-
createComputedPropertyName =
|
|
146996
|
-
updateComputedPropertyName =
|
|
146997
|
-
createTypeParameterDeclaration =
|
|
146998
|
-
updateTypeParameterDeclaration =
|
|
146999
|
-
createParameter =
|
|
147000
|
-
updateParameter =
|
|
147001
|
-
createDecorator =
|
|
147002
|
-
updateDecorator =
|
|
147003
|
-
createProperty =
|
|
147004
|
-
updateProperty =
|
|
147005
|
-
createMethod =
|
|
147006
|
-
updateMethod =
|
|
147007
|
-
createConstructor =
|
|
147008
|
-
updateConstructor =
|
|
147009
|
-
createGetAccessor =
|
|
147010
|
-
updateGetAccessor =
|
|
147011
|
-
createSetAccessor =
|
|
147012
|
-
updateSetAccessor =
|
|
147013
|
-
createCallSignature =
|
|
147014
|
-
updateCallSignature =
|
|
147015
|
-
createConstructSignature =
|
|
147016
|
-
updateConstructSignature =
|
|
147017
|
-
updateIndexSignature =
|
|
147018
|
-
createKeywordTypeNode =
|
|
147019
|
-
createTypePredicateNodeWithModifier =
|
|
147020
|
-
updateTypePredicateNodeWithModifier =
|
|
147021
|
-
createTypeReferenceNode =
|
|
147022
|
-
updateTypeReferenceNode =
|
|
147023
|
-
createFunctionTypeNode =
|
|
147024
|
-
updateFunctionTypeNode =
|
|
147025
|
-
createConstructorTypeNode =
|
|
147214
|
+
createNodeArray = deprecate(factory.createNodeArray, factoryDeprecation);
|
|
147215
|
+
createNumericLiteral = deprecate(factory.createNumericLiteral, factoryDeprecation);
|
|
147216
|
+
createBigIntLiteral = deprecate(factory.createBigIntLiteral, factoryDeprecation);
|
|
147217
|
+
createStringLiteral = deprecate(factory.createStringLiteral, factoryDeprecation);
|
|
147218
|
+
createStringLiteralFromNode = deprecate(factory.createStringLiteralFromNode, factoryDeprecation);
|
|
147219
|
+
createRegularExpressionLiteral = deprecate(factory.createRegularExpressionLiteral, factoryDeprecation);
|
|
147220
|
+
createLoopVariable = deprecate(factory.createLoopVariable, factoryDeprecation);
|
|
147221
|
+
createUniqueName = deprecate(factory.createUniqueName, factoryDeprecation);
|
|
147222
|
+
createPrivateIdentifier = deprecate(factory.createPrivateIdentifier, factoryDeprecation);
|
|
147223
|
+
createSuper = deprecate(factory.createSuper, factoryDeprecation);
|
|
147224
|
+
createThis = deprecate(factory.createThis, factoryDeprecation);
|
|
147225
|
+
createNull = deprecate(factory.createNull, factoryDeprecation);
|
|
147226
|
+
createTrue = deprecate(factory.createTrue, factoryDeprecation);
|
|
147227
|
+
createFalse = deprecate(factory.createFalse, factoryDeprecation);
|
|
147228
|
+
createModifier = deprecate(factory.createModifier, factoryDeprecation);
|
|
147229
|
+
createModifiersFromModifierFlags = deprecate(factory.createModifiersFromModifierFlags, factoryDeprecation);
|
|
147230
|
+
createQualifiedName = deprecate(factory.createQualifiedName, factoryDeprecation);
|
|
147231
|
+
updateQualifiedName = deprecate(factory.updateQualifiedName, factoryDeprecation);
|
|
147232
|
+
createComputedPropertyName = deprecate(factory.createComputedPropertyName, factoryDeprecation);
|
|
147233
|
+
updateComputedPropertyName = deprecate(factory.updateComputedPropertyName, factoryDeprecation);
|
|
147234
|
+
createTypeParameterDeclaration = deprecate(factory.createTypeParameterDeclaration, factoryDeprecation);
|
|
147235
|
+
updateTypeParameterDeclaration = deprecate(factory.updateTypeParameterDeclaration, factoryDeprecation);
|
|
147236
|
+
createParameter = deprecate(factory.createParameterDeclaration, factoryDeprecation);
|
|
147237
|
+
updateParameter = deprecate(factory.updateParameterDeclaration, factoryDeprecation);
|
|
147238
|
+
createDecorator = deprecate(factory.createDecorator, factoryDeprecation);
|
|
147239
|
+
updateDecorator = deprecate(factory.updateDecorator, factoryDeprecation);
|
|
147240
|
+
createProperty = deprecate(factory.createPropertyDeclaration, factoryDeprecation);
|
|
147241
|
+
updateProperty = deprecate(factory.updatePropertyDeclaration, factoryDeprecation);
|
|
147242
|
+
createMethod = deprecate(factory.createMethodDeclaration, factoryDeprecation);
|
|
147243
|
+
updateMethod = deprecate(factory.updateMethodDeclaration, factoryDeprecation);
|
|
147244
|
+
createConstructor = deprecate(factory.createConstructorDeclaration, factoryDeprecation);
|
|
147245
|
+
updateConstructor = deprecate(factory.updateConstructorDeclaration, factoryDeprecation);
|
|
147246
|
+
createGetAccessor = deprecate(factory.createGetAccessorDeclaration, factoryDeprecation);
|
|
147247
|
+
updateGetAccessor = deprecate(factory.updateGetAccessorDeclaration, factoryDeprecation);
|
|
147248
|
+
createSetAccessor = deprecate(factory.createSetAccessorDeclaration, factoryDeprecation);
|
|
147249
|
+
updateSetAccessor = deprecate(factory.updateSetAccessorDeclaration, factoryDeprecation);
|
|
147250
|
+
createCallSignature = deprecate(factory.createCallSignature, factoryDeprecation);
|
|
147251
|
+
updateCallSignature = deprecate(factory.updateCallSignature, factoryDeprecation);
|
|
147252
|
+
createConstructSignature = deprecate(factory.createConstructSignature, factoryDeprecation);
|
|
147253
|
+
updateConstructSignature = deprecate(factory.updateConstructSignature, factoryDeprecation);
|
|
147254
|
+
updateIndexSignature = deprecate(factory.updateIndexSignature, factoryDeprecation);
|
|
147255
|
+
createKeywordTypeNode = deprecate(factory.createKeywordTypeNode, factoryDeprecation);
|
|
147256
|
+
createTypePredicateNodeWithModifier = deprecate(factory.createTypePredicateNode, factoryDeprecation);
|
|
147257
|
+
updateTypePredicateNodeWithModifier = deprecate(factory.updateTypePredicateNode, factoryDeprecation);
|
|
147258
|
+
createTypeReferenceNode = deprecate(factory.createTypeReferenceNode, factoryDeprecation);
|
|
147259
|
+
updateTypeReferenceNode = deprecate(factory.updateTypeReferenceNode, factoryDeprecation);
|
|
147260
|
+
createFunctionTypeNode = deprecate(factory.createFunctionTypeNode, factoryDeprecation);
|
|
147261
|
+
updateFunctionTypeNode = deprecate(factory.updateFunctionTypeNode, factoryDeprecation);
|
|
147262
|
+
createConstructorTypeNode = deprecate((typeParameters, parameters, type) => {
|
|
147026
147263
|
return factory.createConstructorTypeNode(void 0, typeParameters, parameters, type);
|
|
147027
147264
|
}, factoryDeprecation);
|
|
147028
|
-
updateConstructorTypeNode =
|
|
147265
|
+
updateConstructorTypeNode = deprecate((node, typeParameters, parameters, type) => {
|
|
147029
147266
|
return factory.updateConstructorTypeNode(node, node.modifiers, typeParameters, parameters, type);
|
|
147030
147267
|
}, factoryDeprecation);
|
|
147031
|
-
createTypeQueryNode =
|
|
147032
|
-
updateTypeQueryNode =
|
|
147033
|
-
createTypeLiteralNode =
|
|
147034
|
-
updateTypeLiteralNode =
|
|
147035
|
-
createArrayTypeNode =
|
|
147036
|
-
updateArrayTypeNode =
|
|
147037
|
-
createTupleTypeNode =
|
|
147038
|
-
updateTupleTypeNode =
|
|
147039
|
-
createOptionalTypeNode =
|
|
147040
|
-
updateOptionalTypeNode =
|
|
147041
|
-
createRestTypeNode =
|
|
147042
|
-
updateRestTypeNode =
|
|
147043
|
-
createUnionTypeNode =
|
|
147044
|
-
updateUnionTypeNode =
|
|
147045
|
-
createIntersectionTypeNode =
|
|
147046
|
-
updateIntersectionTypeNode =
|
|
147047
|
-
createConditionalTypeNode =
|
|
147048
|
-
updateConditionalTypeNode =
|
|
147049
|
-
createInferTypeNode =
|
|
147050
|
-
updateInferTypeNode =
|
|
147051
|
-
createImportTypeNode =
|
|
147052
|
-
updateImportTypeNode =
|
|
147053
|
-
createParenthesizedType =
|
|
147054
|
-
updateParenthesizedType =
|
|
147055
|
-
createThisTypeNode =
|
|
147056
|
-
updateTypeOperatorNode =
|
|
147057
|
-
createIndexedAccessTypeNode =
|
|
147058
|
-
updateIndexedAccessTypeNode =
|
|
147059
|
-
createMappedTypeNode =
|
|
147060
|
-
updateMappedTypeNode =
|
|
147061
|
-
createLiteralTypeNode =
|
|
147062
|
-
updateLiteralTypeNode =
|
|
147063
|
-
createObjectBindingPattern =
|
|
147064
|
-
updateObjectBindingPattern =
|
|
147065
|
-
createArrayBindingPattern =
|
|
147066
|
-
updateArrayBindingPattern =
|
|
147067
|
-
createBindingElement =
|
|
147068
|
-
updateBindingElement =
|
|
147069
|
-
createArrayLiteral =
|
|
147070
|
-
updateArrayLiteral =
|
|
147071
|
-
createObjectLiteral =
|
|
147072
|
-
updateObjectLiteral =
|
|
147073
|
-
createPropertyAccess =
|
|
147074
|
-
updatePropertyAccess =
|
|
147075
|
-
createPropertyAccessChain =
|
|
147076
|
-
updatePropertyAccessChain =
|
|
147077
|
-
createElementAccess =
|
|
147078
|
-
updateElementAccess =
|
|
147079
|
-
createElementAccessChain =
|
|
147080
|
-
updateElementAccessChain =
|
|
147081
|
-
createCall =
|
|
147082
|
-
updateCall =
|
|
147083
|
-
createCallChain =
|
|
147084
|
-
updateCallChain =
|
|
147085
|
-
createNew =
|
|
147086
|
-
updateNew =
|
|
147087
|
-
createTypeAssertion =
|
|
147088
|
-
updateTypeAssertion =
|
|
147089
|
-
createParen =
|
|
147090
|
-
updateParen =
|
|
147091
|
-
createFunctionExpression =
|
|
147092
|
-
updateFunctionExpression =
|
|
147093
|
-
createDelete =
|
|
147094
|
-
updateDelete =
|
|
147095
|
-
createTypeOf =
|
|
147096
|
-
updateTypeOf =
|
|
147097
|
-
createVoid =
|
|
147098
|
-
updateVoid =
|
|
147099
|
-
createAwait =
|
|
147100
|
-
updateAwait =
|
|
147101
|
-
createPrefix =
|
|
147102
|
-
updatePrefix =
|
|
147103
|
-
createPostfix =
|
|
147104
|
-
updatePostfix =
|
|
147105
|
-
createBinary =
|
|
147106
|
-
updateConditional =
|
|
147107
|
-
createTemplateExpression =
|
|
147108
|
-
updateTemplateExpression =
|
|
147109
|
-
createTemplateHead =
|
|
147110
|
-
createTemplateMiddle =
|
|
147111
|
-
createTemplateTail =
|
|
147112
|
-
createNoSubstitutionTemplateLiteral =
|
|
147113
|
-
updateYield =
|
|
147114
|
-
createSpread =
|
|
147115
|
-
updateSpread =
|
|
147116
|
-
createOmittedExpression =
|
|
147117
|
-
createAsExpression =
|
|
147118
|
-
updateAsExpression =
|
|
147119
|
-
createNonNullExpression =
|
|
147120
|
-
updateNonNullExpression =
|
|
147121
|
-
createNonNullChain =
|
|
147122
|
-
updateNonNullChain =
|
|
147123
|
-
createMetaProperty =
|
|
147124
|
-
updateMetaProperty =
|
|
147125
|
-
createTemplateSpan =
|
|
147126
|
-
updateTemplateSpan =
|
|
147127
|
-
createSemicolonClassElement =
|
|
147128
|
-
createBlock =
|
|
147129
|
-
updateBlock =
|
|
147130
|
-
createVariableStatement =
|
|
147131
|
-
updateVariableStatement =
|
|
147132
|
-
createEmptyStatement =
|
|
147133
|
-
createExpressionStatement =
|
|
147134
|
-
updateExpressionStatement =
|
|
147135
|
-
createStatement =
|
|
147136
|
-
updateStatement =
|
|
147137
|
-
createIf =
|
|
147138
|
-
updateIf =
|
|
147139
|
-
createDo =
|
|
147140
|
-
updateDo =
|
|
147141
|
-
createWhile =
|
|
147142
|
-
updateWhile =
|
|
147143
|
-
createFor =
|
|
147144
|
-
updateFor =
|
|
147145
|
-
createForIn =
|
|
147146
|
-
updateForIn =
|
|
147147
|
-
createForOf =
|
|
147148
|
-
updateForOf =
|
|
147149
|
-
createContinue =
|
|
147150
|
-
updateContinue =
|
|
147151
|
-
createBreak =
|
|
147152
|
-
updateBreak =
|
|
147153
|
-
createReturn =
|
|
147154
|
-
updateReturn =
|
|
147155
|
-
createWith =
|
|
147156
|
-
updateWith =
|
|
147157
|
-
createSwitch =
|
|
147158
|
-
updateSwitch =
|
|
147159
|
-
createLabel =
|
|
147160
|
-
updateLabel =
|
|
147161
|
-
createThrow =
|
|
147162
|
-
updateThrow =
|
|
147163
|
-
createTry =
|
|
147164
|
-
updateTry =
|
|
147165
|
-
createDebuggerStatement =
|
|
147166
|
-
createVariableDeclarationList =
|
|
147167
|
-
updateVariableDeclarationList =
|
|
147168
|
-
createFunctionDeclaration =
|
|
147169
|
-
updateFunctionDeclaration =
|
|
147170
|
-
createClassDeclaration =
|
|
147171
|
-
updateClassDeclaration =
|
|
147172
|
-
createInterfaceDeclaration =
|
|
147173
|
-
updateInterfaceDeclaration =
|
|
147174
|
-
createTypeAliasDeclaration =
|
|
147175
|
-
updateTypeAliasDeclaration =
|
|
147176
|
-
createEnumDeclaration =
|
|
147177
|
-
updateEnumDeclaration =
|
|
147178
|
-
createModuleDeclaration =
|
|
147179
|
-
updateModuleDeclaration =
|
|
147180
|
-
createModuleBlock =
|
|
147181
|
-
updateModuleBlock =
|
|
147182
|
-
createCaseBlock =
|
|
147183
|
-
updateCaseBlock =
|
|
147184
|
-
createNamespaceExportDeclaration =
|
|
147185
|
-
updateNamespaceExportDeclaration =
|
|
147186
|
-
createImportEqualsDeclaration =
|
|
147187
|
-
updateImportEqualsDeclaration =
|
|
147188
|
-
createImportDeclaration =
|
|
147189
|
-
updateImportDeclaration =
|
|
147190
|
-
createNamespaceImport =
|
|
147191
|
-
updateNamespaceImport =
|
|
147192
|
-
createNamedImports =
|
|
147193
|
-
updateNamedImports =
|
|
147194
|
-
createImportSpecifier =
|
|
147195
|
-
updateImportSpecifier =
|
|
147196
|
-
createExportAssignment2 =
|
|
147197
|
-
updateExportAssignment =
|
|
147198
|
-
createNamedExports =
|
|
147199
|
-
updateNamedExports =
|
|
147200
|
-
createExportSpecifier =
|
|
147201
|
-
updateExportSpecifier =
|
|
147202
|
-
createExternalModuleReference =
|
|
147203
|
-
updateExternalModuleReference =
|
|
147204
|
-
createJSDocTypeExpression =
|
|
147205
|
-
createJSDocTypeTag =
|
|
147206
|
-
createJSDocReturnTag =
|
|
147207
|
-
createJSDocThisTag =
|
|
147208
|
-
createJSDocComment =
|
|
147209
|
-
createJSDocParameterTag =
|
|
147210
|
-
createJSDocClassTag =
|
|
147211
|
-
createJSDocAugmentsTag =
|
|
147212
|
-
createJSDocEnumTag =
|
|
147213
|
-
createJSDocTemplateTag =
|
|
147214
|
-
createJSDocTypedefTag =
|
|
147215
|
-
createJSDocCallbackTag =
|
|
147216
|
-
createJSDocSignature =
|
|
147217
|
-
createJSDocPropertyTag =
|
|
147218
|
-
createJSDocTypeLiteral =
|
|
147219
|
-
createJSDocImplementsTag =
|
|
147220
|
-
createJSDocAuthorTag =
|
|
147221
|
-
createJSDocPublicTag =
|
|
147222
|
-
createJSDocPrivateTag =
|
|
147223
|
-
createJSDocProtectedTag =
|
|
147224
|
-
createJSDocReadonlyTag =
|
|
147225
|
-
createJSDocTag =
|
|
147226
|
-
createJsxElement =
|
|
147227
|
-
updateJsxElement =
|
|
147228
|
-
createJsxSelfClosingElement =
|
|
147229
|
-
updateJsxSelfClosingElement =
|
|
147230
|
-
createJsxOpeningElement =
|
|
147231
|
-
updateJsxOpeningElement =
|
|
147232
|
-
createJsxClosingElement =
|
|
147233
|
-
updateJsxClosingElement =
|
|
147234
|
-
createJsxFragment =
|
|
147235
|
-
createJsxText =
|
|
147236
|
-
updateJsxText =
|
|
147237
|
-
createJsxOpeningFragment =
|
|
147238
|
-
createJsxJsxClosingFragment =
|
|
147239
|
-
updateJsxFragment =
|
|
147240
|
-
createJsxAttribute =
|
|
147241
|
-
updateJsxAttribute =
|
|
147242
|
-
createJsxAttributes =
|
|
147243
|
-
updateJsxAttributes =
|
|
147244
|
-
createJsxSpreadAttribute =
|
|
147245
|
-
updateJsxSpreadAttribute =
|
|
147246
|
-
createJsxExpression =
|
|
147247
|
-
updateJsxExpression =
|
|
147248
|
-
createCaseClause =
|
|
147249
|
-
updateCaseClause =
|
|
147250
|
-
createDefaultClause =
|
|
147251
|
-
updateDefaultClause =
|
|
147252
|
-
createHeritageClause =
|
|
147253
|
-
updateHeritageClause =
|
|
147254
|
-
createCatchClause =
|
|
147255
|
-
updateCatchClause =
|
|
147256
|
-
createPropertyAssignment =
|
|
147257
|
-
updatePropertyAssignment =
|
|
147258
|
-
createShorthandPropertyAssignment =
|
|
147259
|
-
updateShorthandPropertyAssignment =
|
|
147260
|
-
createSpreadAssignment =
|
|
147261
|
-
updateSpreadAssignment =
|
|
147262
|
-
createEnumMember =
|
|
147263
|
-
updateEnumMember =
|
|
147264
|
-
updateSourceFileNode =
|
|
147265
|
-
createNotEmittedStatement =
|
|
147266
|
-
createPartiallyEmittedExpression =
|
|
147267
|
-
updatePartiallyEmittedExpression =
|
|
147268
|
-
createCommaList =
|
|
147269
|
-
updateCommaList =
|
|
147270
|
-
createBundle =
|
|
147271
|
-
updateBundle =
|
|
147272
|
-
createImmediatelyInvokedFunctionExpression =
|
|
147273
|
-
createImmediatelyInvokedArrowFunction =
|
|
147274
|
-
createVoidZero =
|
|
147275
|
-
createExportDefault =
|
|
147276
|
-
createExternalModuleExport =
|
|
147277
|
-
createNamespaceExport =
|
|
147278
|
-
updateNamespaceExport =
|
|
147279
|
-
createToken =
|
|
147268
|
+
createTypeQueryNode = deprecate(factory.createTypeQueryNode, factoryDeprecation);
|
|
147269
|
+
updateTypeQueryNode = deprecate(factory.updateTypeQueryNode, factoryDeprecation);
|
|
147270
|
+
createTypeLiteralNode = deprecate(factory.createTypeLiteralNode, factoryDeprecation);
|
|
147271
|
+
updateTypeLiteralNode = deprecate(factory.updateTypeLiteralNode, factoryDeprecation);
|
|
147272
|
+
createArrayTypeNode = deprecate(factory.createArrayTypeNode, factoryDeprecation);
|
|
147273
|
+
updateArrayTypeNode = deprecate(factory.updateArrayTypeNode, factoryDeprecation);
|
|
147274
|
+
createTupleTypeNode = deprecate(factory.createTupleTypeNode, factoryDeprecation);
|
|
147275
|
+
updateTupleTypeNode = deprecate(factory.updateTupleTypeNode, factoryDeprecation);
|
|
147276
|
+
createOptionalTypeNode = deprecate(factory.createOptionalTypeNode, factoryDeprecation);
|
|
147277
|
+
updateOptionalTypeNode = deprecate(factory.updateOptionalTypeNode, factoryDeprecation);
|
|
147278
|
+
createRestTypeNode = deprecate(factory.createRestTypeNode, factoryDeprecation);
|
|
147279
|
+
updateRestTypeNode = deprecate(factory.updateRestTypeNode, factoryDeprecation);
|
|
147280
|
+
createUnionTypeNode = deprecate(factory.createUnionTypeNode, factoryDeprecation);
|
|
147281
|
+
updateUnionTypeNode = deprecate(factory.updateUnionTypeNode, factoryDeprecation);
|
|
147282
|
+
createIntersectionTypeNode = deprecate(factory.createIntersectionTypeNode, factoryDeprecation);
|
|
147283
|
+
updateIntersectionTypeNode = deprecate(factory.updateIntersectionTypeNode, factoryDeprecation);
|
|
147284
|
+
createConditionalTypeNode = deprecate(factory.createConditionalTypeNode, factoryDeprecation);
|
|
147285
|
+
updateConditionalTypeNode = deprecate(factory.updateConditionalTypeNode, factoryDeprecation);
|
|
147286
|
+
createInferTypeNode = deprecate(factory.createInferTypeNode, factoryDeprecation);
|
|
147287
|
+
updateInferTypeNode = deprecate(factory.updateInferTypeNode, factoryDeprecation);
|
|
147288
|
+
createImportTypeNode = deprecate(factory.createImportTypeNode, factoryDeprecation);
|
|
147289
|
+
updateImportTypeNode = deprecate(factory.updateImportTypeNode, factoryDeprecation);
|
|
147290
|
+
createParenthesizedType = deprecate(factory.createParenthesizedType, factoryDeprecation);
|
|
147291
|
+
updateParenthesizedType = deprecate(factory.updateParenthesizedType, factoryDeprecation);
|
|
147292
|
+
createThisTypeNode = deprecate(factory.createThisTypeNode, factoryDeprecation);
|
|
147293
|
+
updateTypeOperatorNode = deprecate(factory.updateTypeOperatorNode, factoryDeprecation);
|
|
147294
|
+
createIndexedAccessTypeNode = deprecate(factory.createIndexedAccessTypeNode, factoryDeprecation);
|
|
147295
|
+
updateIndexedAccessTypeNode = deprecate(factory.updateIndexedAccessTypeNode, factoryDeprecation);
|
|
147296
|
+
createMappedTypeNode = deprecate(factory.createMappedTypeNode, factoryDeprecation);
|
|
147297
|
+
updateMappedTypeNode = deprecate(factory.updateMappedTypeNode, factoryDeprecation);
|
|
147298
|
+
createLiteralTypeNode = deprecate(factory.createLiteralTypeNode, factoryDeprecation);
|
|
147299
|
+
updateLiteralTypeNode = deprecate(factory.updateLiteralTypeNode, factoryDeprecation);
|
|
147300
|
+
createObjectBindingPattern = deprecate(factory.createObjectBindingPattern, factoryDeprecation);
|
|
147301
|
+
updateObjectBindingPattern = deprecate(factory.updateObjectBindingPattern, factoryDeprecation);
|
|
147302
|
+
createArrayBindingPattern = deprecate(factory.createArrayBindingPattern, factoryDeprecation);
|
|
147303
|
+
updateArrayBindingPattern = deprecate(factory.updateArrayBindingPattern, factoryDeprecation);
|
|
147304
|
+
createBindingElement = deprecate(factory.createBindingElement, factoryDeprecation);
|
|
147305
|
+
updateBindingElement = deprecate(factory.updateBindingElement, factoryDeprecation);
|
|
147306
|
+
createArrayLiteral = deprecate(factory.createArrayLiteralExpression, factoryDeprecation);
|
|
147307
|
+
updateArrayLiteral = deprecate(factory.updateArrayLiteralExpression, factoryDeprecation);
|
|
147308
|
+
createObjectLiteral = deprecate(factory.createObjectLiteralExpression, factoryDeprecation);
|
|
147309
|
+
updateObjectLiteral = deprecate(factory.updateObjectLiteralExpression, factoryDeprecation);
|
|
147310
|
+
createPropertyAccess = deprecate(factory.createPropertyAccessExpression, factoryDeprecation);
|
|
147311
|
+
updatePropertyAccess = deprecate(factory.updatePropertyAccessExpression, factoryDeprecation);
|
|
147312
|
+
createPropertyAccessChain = deprecate(factory.createPropertyAccessChain, factoryDeprecation);
|
|
147313
|
+
updatePropertyAccessChain = deprecate(factory.updatePropertyAccessChain, factoryDeprecation);
|
|
147314
|
+
createElementAccess = deprecate(factory.createElementAccessExpression, factoryDeprecation);
|
|
147315
|
+
updateElementAccess = deprecate(factory.updateElementAccessExpression, factoryDeprecation);
|
|
147316
|
+
createElementAccessChain = deprecate(factory.createElementAccessChain, factoryDeprecation);
|
|
147317
|
+
updateElementAccessChain = deprecate(factory.updateElementAccessChain, factoryDeprecation);
|
|
147318
|
+
createCall = deprecate(factory.createCallExpression, factoryDeprecation);
|
|
147319
|
+
updateCall = deprecate(factory.updateCallExpression, factoryDeprecation);
|
|
147320
|
+
createCallChain = deprecate(factory.createCallChain, factoryDeprecation);
|
|
147321
|
+
updateCallChain = deprecate(factory.updateCallChain, factoryDeprecation);
|
|
147322
|
+
createNew = deprecate(factory.createNewExpression, factoryDeprecation);
|
|
147323
|
+
updateNew = deprecate(factory.updateNewExpression, factoryDeprecation);
|
|
147324
|
+
createTypeAssertion = deprecate(factory.createTypeAssertion, factoryDeprecation);
|
|
147325
|
+
updateTypeAssertion = deprecate(factory.updateTypeAssertion, factoryDeprecation);
|
|
147326
|
+
createParen = deprecate(factory.createParenthesizedExpression, factoryDeprecation);
|
|
147327
|
+
updateParen = deprecate(factory.updateParenthesizedExpression, factoryDeprecation);
|
|
147328
|
+
createFunctionExpression = deprecate(factory.createFunctionExpression, factoryDeprecation);
|
|
147329
|
+
updateFunctionExpression = deprecate(factory.updateFunctionExpression, factoryDeprecation);
|
|
147330
|
+
createDelete = deprecate(factory.createDeleteExpression, factoryDeprecation);
|
|
147331
|
+
updateDelete = deprecate(factory.updateDeleteExpression, factoryDeprecation);
|
|
147332
|
+
createTypeOf = deprecate(factory.createTypeOfExpression, factoryDeprecation);
|
|
147333
|
+
updateTypeOf = deprecate(factory.updateTypeOfExpression, factoryDeprecation);
|
|
147334
|
+
createVoid = deprecate(factory.createVoidExpression, factoryDeprecation);
|
|
147335
|
+
updateVoid = deprecate(factory.updateVoidExpression, factoryDeprecation);
|
|
147336
|
+
createAwait = deprecate(factory.createAwaitExpression, factoryDeprecation);
|
|
147337
|
+
updateAwait = deprecate(factory.updateAwaitExpression, factoryDeprecation);
|
|
147338
|
+
createPrefix = deprecate(factory.createPrefixUnaryExpression, factoryDeprecation);
|
|
147339
|
+
updatePrefix = deprecate(factory.updatePrefixUnaryExpression, factoryDeprecation);
|
|
147340
|
+
createPostfix = deprecate(factory.createPostfixUnaryExpression, factoryDeprecation);
|
|
147341
|
+
updatePostfix = deprecate(factory.updatePostfixUnaryExpression, factoryDeprecation);
|
|
147342
|
+
createBinary = deprecate(factory.createBinaryExpression, factoryDeprecation);
|
|
147343
|
+
updateConditional = deprecate(factory.updateConditionalExpression, factoryDeprecation);
|
|
147344
|
+
createTemplateExpression = deprecate(factory.createTemplateExpression, factoryDeprecation);
|
|
147345
|
+
updateTemplateExpression = deprecate(factory.updateTemplateExpression, factoryDeprecation);
|
|
147346
|
+
createTemplateHead = deprecate(factory.createTemplateHead, factoryDeprecation);
|
|
147347
|
+
createTemplateMiddle = deprecate(factory.createTemplateMiddle, factoryDeprecation);
|
|
147348
|
+
createTemplateTail = deprecate(factory.createTemplateTail, factoryDeprecation);
|
|
147349
|
+
createNoSubstitutionTemplateLiteral = deprecate(factory.createNoSubstitutionTemplateLiteral, factoryDeprecation);
|
|
147350
|
+
updateYield = deprecate(factory.updateYieldExpression, factoryDeprecation);
|
|
147351
|
+
createSpread = deprecate(factory.createSpreadElement, factoryDeprecation);
|
|
147352
|
+
updateSpread = deprecate(factory.updateSpreadElement, factoryDeprecation);
|
|
147353
|
+
createOmittedExpression = deprecate(factory.createOmittedExpression, factoryDeprecation);
|
|
147354
|
+
createAsExpression = deprecate(factory.createAsExpression, factoryDeprecation);
|
|
147355
|
+
updateAsExpression = deprecate(factory.updateAsExpression, factoryDeprecation);
|
|
147356
|
+
createNonNullExpression = deprecate(factory.createNonNullExpression, factoryDeprecation);
|
|
147357
|
+
updateNonNullExpression = deprecate(factory.updateNonNullExpression, factoryDeprecation);
|
|
147358
|
+
createNonNullChain = deprecate(factory.createNonNullChain, factoryDeprecation);
|
|
147359
|
+
updateNonNullChain = deprecate(factory.updateNonNullChain, factoryDeprecation);
|
|
147360
|
+
createMetaProperty = deprecate(factory.createMetaProperty, factoryDeprecation);
|
|
147361
|
+
updateMetaProperty = deprecate(factory.updateMetaProperty, factoryDeprecation);
|
|
147362
|
+
createTemplateSpan = deprecate(factory.createTemplateSpan, factoryDeprecation);
|
|
147363
|
+
updateTemplateSpan = deprecate(factory.updateTemplateSpan, factoryDeprecation);
|
|
147364
|
+
createSemicolonClassElement = deprecate(factory.createSemicolonClassElement, factoryDeprecation);
|
|
147365
|
+
createBlock = deprecate(factory.createBlock, factoryDeprecation);
|
|
147366
|
+
updateBlock = deprecate(factory.updateBlock, factoryDeprecation);
|
|
147367
|
+
createVariableStatement = deprecate(factory.createVariableStatement, factoryDeprecation);
|
|
147368
|
+
updateVariableStatement = deprecate(factory.updateVariableStatement, factoryDeprecation);
|
|
147369
|
+
createEmptyStatement = deprecate(factory.createEmptyStatement, factoryDeprecation);
|
|
147370
|
+
createExpressionStatement = deprecate(factory.createExpressionStatement, factoryDeprecation);
|
|
147371
|
+
updateExpressionStatement = deprecate(factory.updateExpressionStatement, factoryDeprecation);
|
|
147372
|
+
createStatement = deprecate(factory.createExpressionStatement, factoryDeprecation);
|
|
147373
|
+
updateStatement = deprecate(factory.updateExpressionStatement, factoryDeprecation);
|
|
147374
|
+
createIf = deprecate(factory.createIfStatement, factoryDeprecation);
|
|
147375
|
+
updateIf = deprecate(factory.updateIfStatement, factoryDeprecation);
|
|
147376
|
+
createDo = deprecate(factory.createDoStatement, factoryDeprecation);
|
|
147377
|
+
updateDo = deprecate(factory.updateDoStatement, factoryDeprecation);
|
|
147378
|
+
createWhile = deprecate(factory.createWhileStatement, factoryDeprecation);
|
|
147379
|
+
updateWhile = deprecate(factory.updateWhileStatement, factoryDeprecation);
|
|
147380
|
+
createFor = deprecate(factory.createForStatement, factoryDeprecation);
|
|
147381
|
+
updateFor = deprecate(factory.updateForStatement, factoryDeprecation);
|
|
147382
|
+
createForIn = deprecate(factory.createForInStatement, factoryDeprecation);
|
|
147383
|
+
updateForIn = deprecate(factory.updateForInStatement, factoryDeprecation);
|
|
147384
|
+
createForOf = deprecate(factory.createForOfStatement, factoryDeprecation);
|
|
147385
|
+
updateForOf = deprecate(factory.updateForOfStatement, factoryDeprecation);
|
|
147386
|
+
createContinue = deprecate(factory.createContinueStatement, factoryDeprecation);
|
|
147387
|
+
updateContinue = deprecate(factory.updateContinueStatement, factoryDeprecation);
|
|
147388
|
+
createBreak = deprecate(factory.createBreakStatement, factoryDeprecation);
|
|
147389
|
+
updateBreak = deprecate(factory.updateBreakStatement, factoryDeprecation);
|
|
147390
|
+
createReturn = deprecate(factory.createReturnStatement, factoryDeprecation);
|
|
147391
|
+
updateReturn = deprecate(factory.updateReturnStatement, factoryDeprecation);
|
|
147392
|
+
createWith = deprecate(factory.createWithStatement, factoryDeprecation);
|
|
147393
|
+
updateWith = deprecate(factory.updateWithStatement, factoryDeprecation);
|
|
147394
|
+
createSwitch = deprecate(factory.createSwitchStatement, factoryDeprecation);
|
|
147395
|
+
updateSwitch = deprecate(factory.updateSwitchStatement, factoryDeprecation);
|
|
147396
|
+
createLabel = deprecate(factory.createLabeledStatement, factoryDeprecation);
|
|
147397
|
+
updateLabel = deprecate(factory.updateLabeledStatement, factoryDeprecation);
|
|
147398
|
+
createThrow = deprecate(factory.createThrowStatement, factoryDeprecation);
|
|
147399
|
+
updateThrow = deprecate(factory.updateThrowStatement, factoryDeprecation);
|
|
147400
|
+
createTry = deprecate(factory.createTryStatement, factoryDeprecation);
|
|
147401
|
+
updateTry = deprecate(factory.updateTryStatement, factoryDeprecation);
|
|
147402
|
+
createDebuggerStatement = deprecate(factory.createDebuggerStatement, factoryDeprecation);
|
|
147403
|
+
createVariableDeclarationList = deprecate(factory.createVariableDeclarationList, factoryDeprecation);
|
|
147404
|
+
updateVariableDeclarationList = deprecate(factory.updateVariableDeclarationList, factoryDeprecation);
|
|
147405
|
+
createFunctionDeclaration = deprecate(factory.createFunctionDeclaration, factoryDeprecation);
|
|
147406
|
+
updateFunctionDeclaration = deprecate(factory.updateFunctionDeclaration, factoryDeprecation);
|
|
147407
|
+
createClassDeclaration = deprecate(factory.createClassDeclaration, factoryDeprecation);
|
|
147408
|
+
updateClassDeclaration = deprecate(factory.updateClassDeclaration, factoryDeprecation);
|
|
147409
|
+
createInterfaceDeclaration = deprecate(factory.createInterfaceDeclaration, factoryDeprecation);
|
|
147410
|
+
updateInterfaceDeclaration = deprecate(factory.updateInterfaceDeclaration, factoryDeprecation);
|
|
147411
|
+
createTypeAliasDeclaration = deprecate(factory.createTypeAliasDeclaration, factoryDeprecation);
|
|
147412
|
+
updateTypeAliasDeclaration = deprecate(factory.updateTypeAliasDeclaration, factoryDeprecation);
|
|
147413
|
+
createEnumDeclaration = deprecate(factory.createEnumDeclaration, factoryDeprecation);
|
|
147414
|
+
updateEnumDeclaration = deprecate(factory.updateEnumDeclaration, factoryDeprecation);
|
|
147415
|
+
createModuleDeclaration = deprecate(factory.createModuleDeclaration, factoryDeprecation);
|
|
147416
|
+
updateModuleDeclaration = deprecate(factory.updateModuleDeclaration, factoryDeprecation);
|
|
147417
|
+
createModuleBlock = deprecate(factory.createModuleBlock, factoryDeprecation);
|
|
147418
|
+
updateModuleBlock = deprecate(factory.updateModuleBlock, factoryDeprecation);
|
|
147419
|
+
createCaseBlock = deprecate(factory.createCaseBlock, factoryDeprecation);
|
|
147420
|
+
updateCaseBlock = deprecate(factory.updateCaseBlock, factoryDeprecation);
|
|
147421
|
+
createNamespaceExportDeclaration = deprecate(factory.createNamespaceExportDeclaration, factoryDeprecation);
|
|
147422
|
+
updateNamespaceExportDeclaration = deprecate(factory.updateNamespaceExportDeclaration, factoryDeprecation);
|
|
147423
|
+
createImportEqualsDeclaration = deprecate(factory.createImportEqualsDeclaration, factoryDeprecation);
|
|
147424
|
+
updateImportEqualsDeclaration = deprecate(factory.updateImportEqualsDeclaration, factoryDeprecation);
|
|
147425
|
+
createImportDeclaration = deprecate(factory.createImportDeclaration, factoryDeprecation);
|
|
147426
|
+
updateImportDeclaration = deprecate(factory.updateImportDeclaration, factoryDeprecation);
|
|
147427
|
+
createNamespaceImport = deprecate(factory.createNamespaceImport, factoryDeprecation);
|
|
147428
|
+
updateNamespaceImport = deprecate(factory.updateNamespaceImport, factoryDeprecation);
|
|
147429
|
+
createNamedImports = deprecate(factory.createNamedImports, factoryDeprecation);
|
|
147430
|
+
updateNamedImports = deprecate(factory.updateNamedImports, factoryDeprecation);
|
|
147431
|
+
createImportSpecifier = deprecate(factory.createImportSpecifier, factoryDeprecation);
|
|
147432
|
+
updateImportSpecifier = deprecate(factory.updateImportSpecifier, factoryDeprecation);
|
|
147433
|
+
createExportAssignment2 = deprecate(factory.createExportAssignment, factoryDeprecation);
|
|
147434
|
+
updateExportAssignment = deprecate(factory.updateExportAssignment, factoryDeprecation);
|
|
147435
|
+
createNamedExports = deprecate(factory.createNamedExports, factoryDeprecation);
|
|
147436
|
+
updateNamedExports = deprecate(factory.updateNamedExports, factoryDeprecation);
|
|
147437
|
+
createExportSpecifier = deprecate(factory.createExportSpecifier, factoryDeprecation);
|
|
147438
|
+
updateExportSpecifier = deprecate(factory.updateExportSpecifier, factoryDeprecation);
|
|
147439
|
+
createExternalModuleReference = deprecate(factory.createExternalModuleReference, factoryDeprecation);
|
|
147440
|
+
updateExternalModuleReference = deprecate(factory.updateExternalModuleReference, factoryDeprecation);
|
|
147441
|
+
createJSDocTypeExpression = deprecate(factory.createJSDocTypeExpression, factoryDeprecation);
|
|
147442
|
+
createJSDocTypeTag = deprecate(factory.createJSDocTypeTag, factoryDeprecation);
|
|
147443
|
+
createJSDocReturnTag = deprecate(factory.createJSDocReturnTag, factoryDeprecation);
|
|
147444
|
+
createJSDocThisTag = deprecate(factory.createJSDocThisTag, factoryDeprecation);
|
|
147445
|
+
createJSDocComment = deprecate(factory.createJSDocComment, factoryDeprecation);
|
|
147446
|
+
createJSDocParameterTag = deprecate(factory.createJSDocParameterTag, factoryDeprecation);
|
|
147447
|
+
createJSDocClassTag = deprecate(factory.createJSDocClassTag, factoryDeprecation);
|
|
147448
|
+
createJSDocAugmentsTag = deprecate(factory.createJSDocAugmentsTag, factoryDeprecation);
|
|
147449
|
+
createJSDocEnumTag = deprecate(factory.createJSDocEnumTag, factoryDeprecation);
|
|
147450
|
+
createJSDocTemplateTag = deprecate(factory.createJSDocTemplateTag, factoryDeprecation);
|
|
147451
|
+
createJSDocTypedefTag = deprecate(factory.createJSDocTypedefTag, factoryDeprecation);
|
|
147452
|
+
createJSDocCallbackTag = deprecate(factory.createJSDocCallbackTag, factoryDeprecation);
|
|
147453
|
+
createJSDocSignature = deprecate(factory.createJSDocSignature, factoryDeprecation);
|
|
147454
|
+
createJSDocPropertyTag = deprecate(factory.createJSDocPropertyTag, factoryDeprecation);
|
|
147455
|
+
createJSDocTypeLiteral = deprecate(factory.createJSDocTypeLiteral, factoryDeprecation);
|
|
147456
|
+
createJSDocImplementsTag = deprecate(factory.createJSDocImplementsTag, factoryDeprecation);
|
|
147457
|
+
createJSDocAuthorTag = deprecate(factory.createJSDocAuthorTag, factoryDeprecation);
|
|
147458
|
+
createJSDocPublicTag = deprecate(factory.createJSDocPublicTag, factoryDeprecation);
|
|
147459
|
+
createJSDocPrivateTag = deprecate(factory.createJSDocPrivateTag, factoryDeprecation);
|
|
147460
|
+
createJSDocProtectedTag = deprecate(factory.createJSDocProtectedTag, factoryDeprecation);
|
|
147461
|
+
createJSDocReadonlyTag = deprecate(factory.createJSDocReadonlyTag, factoryDeprecation);
|
|
147462
|
+
createJSDocTag = deprecate(factory.createJSDocUnknownTag, factoryDeprecation);
|
|
147463
|
+
createJsxElement = deprecate(factory.createJsxElement, factoryDeprecation);
|
|
147464
|
+
updateJsxElement = deprecate(factory.updateJsxElement, factoryDeprecation);
|
|
147465
|
+
createJsxSelfClosingElement = deprecate(factory.createJsxSelfClosingElement, factoryDeprecation);
|
|
147466
|
+
updateJsxSelfClosingElement = deprecate(factory.updateJsxSelfClosingElement, factoryDeprecation);
|
|
147467
|
+
createJsxOpeningElement = deprecate(factory.createJsxOpeningElement, factoryDeprecation);
|
|
147468
|
+
updateJsxOpeningElement = deprecate(factory.updateJsxOpeningElement, factoryDeprecation);
|
|
147469
|
+
createJsxClosingElement = deprecate(factory.createJsxClosingElement, factoryDeprecation);
|
|
147470
|
+
updateJsxClosingElement = deprecate(factory.updateJsxClosingElement, factoryDeprecation);
|
|
147471
|
+
createJsxFragment = deprecate(factory.createJsxFragment, factoryDeprecation);
|
|
147472
|
+
createJsxText = deprecate(factory.createJsxText, factoryDeprecation);
|
|
147473
|
+
updateJsxText = deprecate(factory.updateJsxText, factoryDeprecation);
|
|
147474
|
+
createJsxOpeningFragment = deprecate(factory.createJsxOpeningFragment, factoryDeprecation);
|
|
147475
|
+
createJsxJsxClosingFragment = deprecate(factory.createJsxJsxClosingFragment, factoryDeprecation);
|
|
147476
|
+
updateJsxFragment = deprecate(factory.updateJsxFragment, factoryDeprecation);
|
|
147477
|
+
createJsxAttribute = deprecate(factory.createJsxAttribute, factoryDeprecation);
|
|
147478
|
+
updateJsxAttribute = deprecate(factory.updateJsxAttribute, factoryDeprecation);
|
|
147479
|
+
createJsxAttributes = deprecate(factory.createJsxAttributes, factoryDeprecation);
|
|
147480
|
+
updateJsxAttributes = deprecate(factory.updateJsxAttributes, factoryDeprecation);
|
|
147481
|
+
createJsxSpreadAttribute = deprecate(factory.createJsxSpreadAttribute, factoryDeprecation);
|
|
147482
|
+
updateJsxSpreadAttribute = deprecate(factory.updateJsxSpreadAttribute, factoryDeprecation);
|
|
147483
|
+
createJsxExpression = deprecate(factory.createJsxExpression, factoryDeprecation);
|
|
147484
|
+
updateJsxExpression = deprecate(factory.updateJsxExpression, factoryDeprecation);
|
|
147485
|
+
createCaseClause = deprecate(factory.createCaseClause, factoryDeprecation);
|
|
147486
|
+
updateCaseClause = deprecate(factory.updateCaseClause, factoryDeprecation);
|
|
147487
|
+
createDefaultClause = deprecate(factory.createDefaultClause, factoryDeprecation);
|
|
147488
|
+
updateDefaultClause = deprecate(factory.updateDefaultClause, factoryDeprecation);
|
|
147489
|
+
createHeritageClause = deprecate(factory.createHeritageClause, factoryDeprecation);
|
|
147490
|
+
updateHeritageClause = deprecate(factory.updateHeritageClause, factoryDeprecation);
|
|
147491
|
+
createCatchClause = deprecate(factory.createCatchClause, factoryDeprecation);
|
|
147492
|
+
updateCatchClause = deprecate(factory.updateCatchClause, factoryDeprecation);
|
|
147493
|
+
createPropertyAssignment = deprecate(factory.createPropertyAssignment, factoryDeprecation);
|
|
147494
|
+
updatePropertyAssignment = deprecate(factory.updatePropertyAssignment, factoryDeprecation);
|
|
147495
|
+
createShorthandPropertyAssignment = deprecate(factory.createShorthandPropertyAssignment, factoryDeprecation);
|
|
147496
|
+
updateShorthandPropertyAssignment = deprecate(factory.updateShorthandPropertyAssignment, factoryDeprecation);
|
|
147497
|
+
createSpreadAssignment = deprecate(factory.createSpreadAssignment, factoryDeprecation);
|
|
147498
|
+
updateSpreadAssignment = deprecate(factory.updateSpreadAssignment, factoryDeprecation);
|
|
147499
|
+
createEnumMember = deprecate(factory.createEnumMember, factoryDeprecation);
|
|
147500
|
+
updateEnumMember = deprecate(factory.updateEnumMember, factoryDeprecation);
|
|
147501
|
+
updateSourceFileNode = deprecate(factory.updateSourceFile, factoryDeprecation);
|
|
147502
|
+
createNotEmittedStatement = deprecate(factory.createNotEmittedStatement, factoryDeprecation);
|
|
147503
|
+
createPartiallyEmittedExpression = deprecate(factory.createPartiallyEmittedExpression, factoryDeprecation);
|
|
147504
|
+
updatePartiallyEmittedExpression = deprecate(factory.updatePartiallyEmittedExpression, factoryDeprecation);
|
|
147505
|
+
createCommaList = deprecate(factory.createCommaListExpression, factoryDeprecation);
|
|
147506
|
+
updateCommaList = deprecate(factory.updateCommaListExpression, factoryDeprecation);
|
|
147507
|
+
createBundle = deprecate(factory.createBundle, factoryDeprecation);
|
|
147508
|
+
updateBundle = deprecate(factory.updateBundle, factoryDeprecation);
|
|
147509
|
+
createImmediatelyInvokedFunctionExpression = deprecate(factory.createImmediatelyInvokedFunctionExpression, factoryDeprecation);
|
|
147510
|
+
createImmediatelyInvokedArrowFunction = deprecate(factory.createImmediatelyInvokedArrowFunction, factoryDeprecation);
|
|
147511
|
+
createVoidZero = deprecate(factory.createVoidZero, factoryDeprecation);
|
|
147512
|
+
createExportDefault = deprecate(factory.createExportDefault, factoryDeprecation);
|
|
147513
|
+
createExternalModuleExport = deprecate(factory.createExternalModuleExport, factoryDeprecation);
|
|
147514
|
+
createNamespaceExport = deprecate(factory.createNamespaceExport, factoryDeprecation);
|
|
147515
|
+
updateNamespaceExport = deprecate(factory.updateNamespaceExport, factoryDeprecation);
|
|
147516
|
+
createToken = deprecate(function createToken2(kind) {
|
|
147280
147517
|
return factory.createToken(kind);
|
|
147281
147518
|
}, factoryDeprecation);
|
|
147282
|
-
createIdentifier =
|
|
147519
|
+
createIdentifier = deprecate(function createIdentifier2(text) {
|
|
147283
147520
|
return factory.createIdentifier(text, void 0, void 0);
|
|
147284
147521
|
}, factoryDeprecation);
|
|
147285
|
-
createTempVariable =
|
|
147522
|
+
createTempVariable = deprecate(function createTempVariable2(recordTempVariable) {
|
|
147286
147523
|
return factory.createTempVariable(recordTempVariable, void 0);
|
|
147287
147524
|
}, factoryDeprecation);
|
|
147288
|
-
getGeneratedNameForNode =
|
|
147525
|
+
getGeneratedNameForNode = deprecate(function getGeneratedNameForNode2(node) {
|
|
147289
147526
|
return factory.getGeneratedNameForNode(node, void 0);
|
|
147290
147527
|
}, factoryDeprecation);
|
|
147291
|
-
createOptimisticUniqueName =
|
|
147528
|
+
createOptimisticUniqueName = deprecate(function createOptimisticUniqueName2(text) {
|
|
147292
147529
|
return factory.createUniqueName(text, 16 /* Optimistic */);
|
|
147293
147530
|
}, factoryDeprecation);
|
|
147294
|
-
createFileLevelUniqueName =
|
|
147531
|
+
createFileLevelUniqueName = deprecate(function createFileLevelUniqueName2(text) {
|
|
147295
147532
|
return factory.createUniqueName(text, 16 /* Optimistic */ | 32 /* FileLevel */);
|
|
147296
147533
|
}, factoryDeprecation);
|
|
147297
|
-
createIndexSignature =
|
|
147534
|
+
createIndexSignature = deprecate(function createIndexSignature2(decorators, modifiers, parameters, type) {
|
|
147298
147535
|
return factory.createIndexSignature(decorators, modifiers, parameters, type);
|
|
147299
147536
|
}, factoryDeprecation);
|
|
147300
|
-
createTypePredicateNode =
|
|
147537
|
+
createTypePredicateNode = deprecate(function createTypePredicateNode2(parameterName, type) {
|
|
147301
147538
|
return factory.createTypePredicateNode(void 0, parameterName, type);
|
|
147302
147539
|
}, factoryDeprecation);
|
|
147303
|
-
updateTypePredicateNode =
|
|
147540
|
+
updateTypePredicateNode = deprecate(function updateTypePredicateNode2(node, parameterName, type) {
|
|
147304
147541
|
return factory.updateTypePredicateNode(node, void 0, parameterName, type);
|
|
147305
147542
|
}, factoryDeprecation);
|
|
147306
|
-
createLiteral =
|
|
147543
|
+
createLiteral = deprecate(function createLiteral2(value) {
|
|
147307
147544
|
if (typeof value === "number") {
|
|
147308
147545
|
return factory.createNumericLiteral(value);
|
|
147309
147546
|
}
|
|
@@ -147318,13 +147555,13 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
147318
147555
|
}
|
|
147319
147556
|
return factory.createStringLiteralFromNode(value);
|
|
147320
147557
|
}, { since: "4.0", warnAfter: "4.1", message: "Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead." });
|
|
147321
|
-
createMethodSignature =
|
|
147558
|
+
createMethodSignature = deprecate(function createMethodSignature2(typeParameters, parameters, type, name, questionToken) {
|
|
147322
147559
|
return factory.createMethodSignature(void 0, name, questionToken, typeParameters, parameters, type);
|
|
147323
147560
|
}, factoryDeprecation);
|
|
147324
|
-
updateMethodSignature =
|
|
147561
|
+
updateMethodSignature = deprecate(function updateMethodSignature2(node, typeParameters, parameters, type, name, questionToken) {
|
|
147325
147562
|
return factory.updateMethodSignature(node, node.modifiers, name, questionToken, typeParameters, parameters, type);
|
|
147326
147563
|
}, factoryDeprecation);
|
|
147327
|
-
createTypeOperatorNode =
|
|
147564
|
+
createTypeOperatorNode = deprecate(function createTypeOperatorNode2(operatorOrType, type) {
|
|
147328
147565
|
let operator;
|
|
147329
147566
|
if (type) {
|
|
147330
147567
|
operator = operatorOrType;
|
|
@@ -147334,7 +147571,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
147334
147571
|
}
|
|
147335
147572
|
return factory.createTypeOperatorNode(operator, type);
|
|
147336
147573
|
}, factoryDeprecation);
|
|
147337
|
-
createTaggedTemplate =
|
|
147574
|
+
createTaggedTemplate = deprecate(function createTaggedTemplate2(tag, typeArgumentsOrTemplate, template) {
|
|
147338
147575
|
let typeArguments;
|
|
147339
147576
|
if (template) {
|
|
147340
147577
|
typeArguments = typeArgumentsOrTemplate;
|
|
@@ -147343,7 +147580,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
147343
147580
|
}
|
|
147344
147581
|
return factory.createTaggedTemplateExpression(tag, typeArguments, template);
|
|
147345
147582
|
}, factoryDeprecation);
|
|
147346
|
-
updateTaggedTemplate =
|
|
147583
|
+
updateTaggedTemplate = deprecate(function updateTaggedTemplate2(node, tag, typeArgumentsOrTemplate, template) {
|
|
147347
147584
|
let typeArguments;
|
|
147348
147585
|
if (template) {
|
|
147349
147586
|
typeArguments = typeArgumentsOrTemplate;
|
|
@@ -147352,16 +147589,16 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
147352
147589
|
}
|
|
147353
147590
|
return factory.updateTaggedTemplateExpression(node, tag, typeArguments, template);
|
|
147354
147591
|
}, factoryDeprecation);
|
|
147355
|
-
updateBinary =
|
|
147592
|
+
updateBinary = deprecate(function updateBinary2(node, left, right, operator = node.operatorToken) {
|
|
147356
147593
|
if (typeof operator === "number") {
|
|
147357
147594
|
operator = operator === node.operatorToken.kind ? node.operatorToken : factory.createToken(operator);
|
|
147358
147595
|
}
|
|
147359
147596
|
return factory.updateBinaryExpression(node, left, operator, right);
|
|
147360
147597
|
}, factoryDeprecation);
|
|
147361
|
-
createConditional =
|
|
147598
|
+
createConditional = deprecate(function createConditional2(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonToken, whenFalse) {
|
|
147362
147599
|
return arguments.length === 5 ? factory.createConditionalExpression(condition, questionTokenOrWhenTrue, whenTrueOrWhenFalse, colonToken, whenFalse) : arguments.length === 3 ? factory.createConditionalExpression(condition, factory.createToken(57 /* QuestionToken */), questionTokenOrWhenTrue, factory.createToken(58 /* ColonToken */), whenTrueOrWhenFalse) : Debug.fail("Argument count mismatch");
|
|
147363
147600
|
}, factoryDeprecation);
|
|
147364
|
-
createYield =
|
|
147601
|
+
createYield = deprecate(function createYield2(asteriskTokenOrExpression, expression) {
|
|
147365
147602
|
let asteriskToken;
|
|
147366
147603
|
if (expression) {
|
|
147367
147604
|
asteriskToken = asteriskTokenOrExpression;
|
|
@@ -147370,18 +147607,18 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
147370
147607
|
}
|
|
147371
147608
|
return factory.createYieldExpression(asteriskToken, expression);
|
|
147372
147609
|
}, factoryDeprecation);
|
|
147373
|
-
createClassExpression =
|
|
147610
|
+
createClassExpression = deprecate(function createClassExpression2(modifiers, name, typeParameters, heritageClauses, members) {
|
|
147374
147611
|
return factory.createClassExpression(void 0, modifiers, name, typeParameters, heritageClauses, members);
|
|
147375
147612
|
}, factoryDeprecation);
|
|
147376
|
-
updateClassExpression =
|
|
147613
|
+
updateClassExpression = deprecate(function updateClassExpression2(node, modifiers, name, typeParameters, heritageClauses, members) {
|
|
147377
147614
|
return factory.updateClassExpression(node, void 0, modifiers, name, typeParameters, heritageClauses, members);
|
|
147378
147615
|
}, factoryDeprecation);
|
|
147379
|
-
createPropertySignature =
|
|
147616
|
+
createPropertySignature = deprecate(function createPropertySignature2(modifiers, name, questionToken, type, initializer) {
|
|
147380
147617
|
const node = factory.createPropertySignature(modifiers, name, questionToken, type);
|
|
147381
147618
|
node.initializer = initializer;
|
|
147382
147619
|
return node;
|
|
147383
147620
|
}, factoryDeprecation);
|
|
147384
|
-
updatePropertySignature =
|
|
147621
|
+
updatePropertySignature = deprecate(function updatePropertySignature2(node, modifiers, name, questionToken, type, initializer) {
|
|
147385
147622
|
let updated = factory.updatePropertySignature(node, modifiers, name, questionToken, type);
|
|
147386
147623
|
if (node.initializer !== initializer) {
|
|
147387
147624
|
if (updated === node) {
|
|
@@ -147391,80 +147628,80 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
147391
147628
|
}
|
|
147392
147629
|
return updated;
|
|
147393
147630
|
}, factoryDeprecation);
|
|
147394
|
-
createExpressionWithTypeArguments =
|
|
147631
|
+
createExpressionWithTypeArguments = deprecate(function createExpressionWithTypeArguments2(typeArguments, expression) {
|
|
147395
147632
|
return factory.createExpressionWithTypeArguments(expression, typeArguments);
|
|
147396
147633
|
}, factoryDeprecation);
|
|
147397
|
-
updateExpressionWithTypeArguments =
|
|
147634
|
+
updateExpressionWithTypeArguments = deprecate(function updateExpressionWithTypeArguments2(node, typeArguments, expression) {
|
|
147398
147635
|
return factory.updateExpressionWithTypeArguments(node, expression, typeArguments);
|
|
147399
147636
|
}, factoryDeprecation);
|
|
147400
|
-
createArrowFunction =
|
|
147637
|
+
createArrowFunction = deprecate(function createArrowFunction2(modifiers, typeParameters, parameters, type, equalsGreaterThanTokenOrBody, body) {
|
|
147401
147638
|
return arguments.length === 6 ? factory.createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanTokenOrBody, body) : arguments.length === 5 ? factory.createArrowFunction(modifiers, typeParameters, parameters, type, void 0, equalsGreaterThanTokenOrBody) : Debug.fail("Argument count mismatch");
|
|
147402
147639
|
}, factoryDeprecation);
|
|
147403
|
-
updateArrowFunction =
|
|
147640
|
+
updateArrowFunction = deprecate(function updateArrowFunction2(node, modifiers, typeParameters, parameters, type, equalsGreaterThanTokenOrBody, body) {
|
|
147404
147641
|
return arguments.length === 7 ? factory.updateArrowFunction(node, modifiers, typeParameters, parameters, type, equalsGreaterThanTokenOrBody, body) : arguments.length === 6 ? factory.updateArrowFunction(node, modifiers, typeParameters, parameters, type, node.equalsGreaterThanToken, equalsGreaterThanTokenOrBody) : Debug.fail("Argument count mismatch");
|
|
147405
147642
|
}, factoryDeprecation);
|
|
147406
|
-
createVariableDeclaration =
|
|
147643
|
+
createVariableDeclaration = deprecate(function createVariableDeclaration2(name, exclamationTokenOrType, typeOrInitializer, initializer) {
|
|
147407
147644
|
return arguments.length === 4 ? factory.createVariableDeclaration(name, exclamationTokenOrType, typeOrInitializer, initializer) : arguments.length >= 1 && arguments.length <= 3 ? factory.createVariableDeclaration(name, void 0, exclamationTokenOrType, typeOrInitializer) : Debug.fail("Argument count mismatch");
|
|
147408
147645
|
}, factoryDeprecation);
|
|
147409
|
-
updateVariableDeclaration =
|
|
147646
|
+
updateVariableDeclaration = deprecate(function updateVariableDeclaration2(node, name, exclamationTokenOrType, typeOrInitializer, initializer) {
|
|
147410
147647
|
return arguments.length === 5 ? factory.updateVariableDeclaration(node, name, exclamationTokenOrType, typeOrInitializer, initializer) : arguments.length === 4 ? factory.updateVariableDeclaration(node, name, node.exclamationToken, exclamationTokenOrType, typeOrInitializer) : Debug.fail("Argument count mismatch");
|
|
147411
147648
|
}, factoryDeprecation);
|
|
147412
|
-
createImportClause =
|
|
147649
|
+
createImportClause = deprecate(function createImportClause2(name, namedBindings, isTypeOnly = false) {
|
|
147413
147650
|
return factory.createImportClause(isTypeOnly, name, namedBindings);
|
|
147414
147651
|
}, factoryDeprecation);
|
|
147415
|
-
updateImportClause =
|
|
147652
|
+
updateImportClause = deprecate(function updateImportClause2(node, name, namedBindings, isTypeOnly) {
|
|
147416
147653
|
return factory.updateImportClause(node, isTypeOnly, name, namedBindings);
|
|
147417
147654
|
}, factoryDeprecation);
|
|
147418
|
-
createExportDeclaration =
|
|
147655
|
+
createExportDeclaration = deprecate(function createExportDeclaration2(decorators, modifiers, exportClause, moduleSpecifier, isTypeOnly = false) {
|
|
147419
147656
|
return factory.createExportDeclaration(decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier);
|
|
147420
147657
|
}, factoryDeprecation);
|
|
147421
|
-
updateExportDeclaration =
|
|
147658
|
+
updateExportDeclaration = deprecate(function updateExportDeclaration2(node, decorators, modifiers, exportClause, moduleSpecifier, isTypeOnly) {
|
|
147422
147659
|
return factory.updateExportDeclaration(node, decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier, node.assertClause);
|
|
147423
147660
|
}, factoryDeprecation);
|
|
147424
|
-
createJSDocParamTag =
|
|
147661
|
+
createJSDocParamTag = deprecate(function createJSDocParamTag2(name, isBracketed, typeExpression, comment) {
|
|
147425
147662
|
return factory.createJSDocParameterTag(void 0, name, isBracketed, typeExpression, false, comment ? factory.createNodeArray([factory.createJSDocText(comment)]) : void 0);
|
|
147426
147663
|
}, factoryDeprecation);
|
|
147427
|
-
createComma =
|
|
147664
|
+
createComma = deprecate(function createComma2(left, right) {
|
|
147428
147665
|
return factory.createComma(left, right);
|
|
147429
147666
|
}, factoryDeprecation);
|
|
147430
|
-
createLessThan =
|
|
147667
|
+
createLessThan = deprecate(function createLessThan2(left, right) {
|
|
147431
147668
|
return factory.createLessThan(left, right);
|
|
147432
147669
|
}, factoryDeprecation);
|
|
147433
|
-
createAssignment =
|
|
147670
|
+
createAssignment = deprecate(function createAssignment2(left, right) {
|
|
147434
147671
|
return factory.createAssignment(left, right);
|
|
147435
147672
|
}, factoryDeprecation);
|
|
147436
|
-
createStrictEquality =
|
|
147673
|
+
createStrictEquality = deprecate(function createStrictEquality2(left, right) {
|
|
147437
147674
|
return factory.createStrictEquality(left, right);
|
|
147438
147675
|
}, factoryDeprecation);
|
|
147439
|
-
createStrictInequality =
|
|
147676
|
+
createStrictInequality = deprecate(function createStrictInequality2(left, right) {
|
|
147440
147677
|
return factory.createStrictInequality(left, right);
|
|
147441
147678
|
}, factoryDeprecation);
|
|
147442
|
-
createAdd =
|
|
147679
|
+
createAdd = deprecate(function createAdd2(left, right) {
|
|
147443
147680
|
return factory.createAdd(left, right);
|
|
147444
147681
|
}, factoryDeprecation);
|
|
147445
|
-
createSubtract =
|
|
147682
|
+
createSubtract = deprecate(function createSubtract2(left, right) {
|
|
147446
147683
|
return factory.createSubtract(left, right);
|
|
147447
147684
|
}, factoryDeprecation);
|
|
147448
|
-
createLogicalAnd =
|
|
147685
|
+
createLogicalAnd = deprecate(function createLogicalAnd2(left, right) {
|
|
147449
147686
|
return factory.createLogicalAnd(left, right);
|
|
147450
147687
|
}, factoryDeprecation);
|
|
147451
|
-
createLogicalOr =
|
|
147688
|
+
createLogicalOr = deprecate(function createLogicalOr2(left, right) {
|
|
147452
147689
|
return factory.createLogicalOr(left, right);
|
|
147453
147690
|
}, factoryDeprecation);
|
|
147454
|
-
createPostfixIncrement =
|
|
147691
|
+
createPostfixIncrement = deprecate(function createPostfixIncrement2(operand) {
|
|
147455
147692
|
return factory.createPostfixIncrement(operand);
|
|
147456
147693
|
}, factoryDeprecation);
|
|
147457
|
-
createLogicalNot =
|
|
147694
|
+
createLogicalNot = deprecate(function createLogicalNot2(operand) {
|
|
147458
147695
|
return factory.createLogicalNot(operand);
|
|
147459
147696
|
}, factoryDeprecation);
|
|
147460
|
-
createNode2 =
|
|
147697
|
+
createNode2 = deprecate(function createNode3(kind, pos = 0, end = 0) {
|
|
147461
147698
|
return setTextRangePosEnd(
|
|
147462
147699
|
kind === 308 /* SourceFile */ ? parseBaseNodeFactory.createBaseSourceFileNode(kind) : kind === 79 /* Identifier */ ? parseBaseNodeFactory.createBaseIdentifierNode(kind) : kind === 80 /* PrivateIdentifier */ ? parseBaseNodeFactory.createBasePrivateIdentifierNode(kind) : !isNodeKind(kind) ? parseBaseNodeFactory.createBaseTokenNode(kind) : parseBaseNodeFactory.createBaseNode(kind),
|
|
147463
147700
|
pos,
|
|
147464
147701
|
end
|
|
147465
147702
|
);
|
|
147466
147703
|
}, { since: "4.0", warnAfter: "4.1", message: "Use an appropriate `factory` method instead." });
|
|
147467
|
-
getMutableClone =
|
|
147704
|
+
getMutableClone = deprecate(function getMutableClone2(node) {
|
|
147468
147705
|
const clone2 = factory.cloneNode(node);
|
|
147469
147706
|
setTextRange(clone2, node);
|
|
147470
147707
|
setParent(clone2, node.parent);
|
|
@@ -147479,7 +147716,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
147479
147716
|
"src/deprecatedCompat/4.0/renamedNodeTests.ts"() {
|
|
147480
147717
|
"use strict";
|
|
147481
147718
|
init_ts5();
|
|
147482
|
-
|
|
147719
|
+
init_deprecate();
|
|
147720
|
+
isTypeAssertion = deprecate(function isTypeAssertion2(node) {
|
|
147483
147721
|
return node.kind === 213 /* TypeAssertionExpression */;
|
|
147484
147722
|
}, {
|
|
147485
147723
|
since: "4.0",
|
|
@@ -147495,7 +147733,8 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
147495
147733
|
"src/deprecatedCompat/4.2/renamedNodeTests.ts"() {
|
|
147496
147734
|
"use strict";
|
|
147497
147735
|
init_ts5();
|
|
147498
|
-
|
|
147736
|
+
init_deprecate();
|
|
147737
|
+
isIdentifierOrPrivateIdentifier = deprecate(function isIdentifierOrPrivateIdentifier2(node) {
|
|
147499
147738
|
return isMemberName(node);
|
|
147500
147739
|
}, {
|
|
147501
147740
|
since: "4.2",
|
|
@@ -148409,6 +148648,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
148409
148648
|
canHaveModifiers: () => canHaveModifiers,
|
|
148410
148649
|
canJsonReportNoInputFiles: () => canJsonReportNoInputFiles,
|
|
148411
148650
|
canProduceDiagnostics: () => canProduceDiagnostics,
|
|
148651
|
+
canUsePropertyAccess: () => canUsePropertyAccess,
|
|
148412
148652
|
canWatchDirectoryOrFile: () => canWatchDirectoryOrFile,
|
|
148413
148653
|
cartesianProduct: () => cartesianProduct,
|
|
148414
148654
|
cast: () => cast,
|
|
@@ -150084,6 +150324,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
150084
150324
|
isUnparsedSource: () => isUnparsedSource,
|
|
150085
150325
|
isUnparsedTextLike: () => isUnparsedTextLike,
|
|
150086
150326
|
isUrl: () => isUrl,
|
|
150327
|
+
isValidBigIntString: () => isValidBigIntString,
|
|
150087
150328
|
isValidESSymbolDeclaration: () => isValidESSymbolDeclaration,
|
|
150088
150329
|
isValidTypeOnlyAliasUseSite: () => isValidTypeOnlyAliasUseSite,
|
|
150089
150330
|
isValueSignatureDeclaration: () => isValueSignatureDeclaration,
|
|
@@ -150215,6 +150456,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
150215
150456
|
parameterIsThisKeyword: () => parameterIsThisKeyword,
|
|
150216
150457
|
parameterNamePart: () => parameterNamePart,
|
|
150217
150458
|
parseBaseNodeFactory: () => parseBaseNodeFactory,
|
|
150459
|
+
parseBigInt: () => parseBigInt,
|
|
150218
150460
|
parseBuildCommand: () => parseBuildCommand,
|
|
150219
150461
|
parseCommandLine: () => parseCommandLine,
|
|
150220
150462
|
parseCommandLineWorker: () => parseCommandLineWorker,
|
|
@@ -150233,6 +150475,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
150233
150475
|
parseNodeModuleFromPath: () => parseNodeModuleFromPath,
|
|
150234
150476
|
parsePackageName: () => parsePackageName,
|
|
150235
150477
|
parsePseudoBigInt: () => parsePseudoBigInt,
|
|
150478
|
+
parseValidBigInt: () => parseValidBigInt,
|
|
150236
150479
|
patchWriteFileEnsuringDirectory: () => patchWriteFileEnsuringDirectory,
|
|
150237
150480
|
pathContainsNodeModules: () => pathContainsNodeModules,
|
|
150238
150481
|
pathIsAbsolute: () => pathIsAbsolute,
|
|
@@ -150413,6 +150656,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
150413
150656
|
supportedLocaleDirectories: () => supportedLocaleDirectories,
|
|
150414
150657
|
supportedTSExtensions: () => supportedTSExtensions,
|
|
150415
150658
|
supportedTSExtensionsFlat: () => supportedTSExtensionsFlat,
|
|
150659
|
+
supportedTSImplementationExtensions: () => supportedTSImplementationExtensions,
|
|
150416
150660
|
suppressLeadingAndTrailingTrivia: () => suppressLeadingAndTrailingTrivia,
|
|
150417
150661
|
suppressLeadingTrivia: () => suppressLeadingTrivia,
|
|
150418
150662
|
suppressTrailingTrivia: () => suppressTrailingTrivia,
|