typescript 5.1.0-dev.20230330 → 5.1.0-dev.20230401
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/tsc.js +121 -95
- package/lib/tsserver.js +178 -121
- package/lib/tsserverlibrary.js +172 -121
- package/lib/typescript.js +156 -111
- package/lib/typingsInstaller.js +9 -9
- package/package.json +2 -2
package/lib/tsserverlibrary.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.1";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230401`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -5336,7 +5336,7 @@ ${lanes.join("\n")}
|
|
|
5336
5336
|
queue.pollScheduled = false;
|
|
5337
5337
|
return queue;
|
|
5338
5338
|
}
|
|
5339
|
-
function pollPollingIntervalQueue(queue) {
|
|
5339
|
+
function pollPollingIntervalQueue(_timeoutType, queue) {
|
|
5340
5340
|
queue.pollIndex = pollQueue(queue, queue.pollingInterval, queue.pollIndex, pollingChunkSize[queue.pollingInterval]);
|
|
5341
5341
|
if (queue.length) {
|
|
5342
5342
|
scheduleNextPoll(queue.pollingInterval);
|
|
@@ -5345,7 +5345,7 @@ ${lanes.join("\n")}
|
|
|
5345
5345
|
queue.pollScheduled = false;
|
|
5346
5346
|
}
|
|
5347
5347
|
}
|
|
5348
|
-
function pollLowPollingIntervalQueue(queue) {
|
|
5348
|
+
function pollLowPollingIntervalQueue(_timeoutType, queue) {
|
|
5349
5349
|
pollQueue(
|
|
5350
5350
|
changedFilesInLastPoll,
|
|
5351
5351
|
250 /* Low */,
|
|
@@ -5353,7 +5353,7 @@ ${lanes.join("\n")}
|
|
|
5353
5353
|
0,
|
|
5354
5354
|
changedFilesInLastPoll.length
|
|
5355
5355
|
);
|
|
5356
|
-
pollPollingIntervalQueue(queue);
|
|
5356
|
+
pollPollingIntervalQueue(_timeoutType, queue);
|
|
5357
5357
|
if (!queue.pollScheduled && changedFilesInLastPoll.length) {
|
|
5358
5358
|
scheduleNextPoll(250 /* Low */);
|
|
5359
5359
|
}
|
|
@@ -5410,7 +5410,7 @@ ${lanes.join("\n")}
|
|
|
5410
5410
|
}
|
|
5411
5411
|
}
|
|
5412
5412
|
function scheduleNextPoll(pollingInterval) {
|
|
5413
|
-
pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingIntervalQueue(pollingInterval));
|
|
5413
|
+
pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval));
|
|
5414
5414
|
}
|
|
5415
5415
|
}
|
|
5416
5416
|
function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames) {
|
|
@@ -5489,7 +5489,7 @@ ${lanes.join("\n")}
|
|
|
5489
5489
|
function scheduleNextPoll() {
|
|
5490
5490
|
if (!watchedFiles.length || pollScheduled)
|
|
5491
5491
|
return;
|
|
5492
|
-
pollScheduled = host.setTimeout(pollQueue, 2e3 /* High
|
|
5492
|
+
pollScheduled = host.setTimeout(pollQueue, 2e3 /* High */, "pollQueue");
|
|
5493
5493
|
}
|
|
5494
5494
|
}
|
|
5495
5495
|
function createSingleWatcherPerName(cache, useCaseSensitiveFileNames, name, callback, createWatcher) {
|
|
@@ -5655,7 +5655,7 @@ ${lanes.join("\n")}
|
|
|
5655
5655
|
clearTimeout2(timerToUpdateChildWatches);
|
|
5656
5656
|
timerToUpdateChildWatches = void 0;
|
|
5657
5657
|
}
|
|
5658
|
-
timerToUpdateChildWatches = setTimeout2(onTimerToUpdateChildWatches, 1e3);
|
|
5658
|
+
timerToUpdateChildWatches = setTimeout2(onTimerToUpdateChildWatches, 1e3, "timerToUpdateChildWatches");
|
|
5659
5659
|
}
|
|
5660
5660
|
function onTimerToUpdateChildWatches() {
|
|
5661
5661
|
timerToUpdateChildWatches = void 0;
|
|
@@ -7532,7 +7532,6 @@ ${lanes.join("\n")}
|
|
|
7532
7532
|
Constructors_for_derived_classes_must_contain_a_super_call: diag(2377, 1 /* Error */, "Constructors_for_derived_classes_must_contain_a_super_call_2377", "Constructors for derived classes must contain a 'super' call."),
|
|
7533
7533
|
A_get_accessor_must_return_a_value: diag(2378, 1 /* Error */, "A_get_accessor_must_return_a_value_2378", "A 'get' accessor must return a value."),
|
|
7534
7534
|
Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2379, 1 /* Error */, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379", "Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),
|
|
7535
|
-
The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type: diag(2380, 1 /* Error */, "The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type_2380", "The return type of a 'get' accessor must be assignable to its 'set' accessor type"),
|
|
7536
7535
|
Overload_signatures_must_all_be_exported_or_non_exported: diag(2383, 1 /* Error */, "Overload_signatures_must_all_be_exported_or_non_exported_2383", "Overload signatures must all be exported or non-exported."),
|
|
7537
7536
|
Overload_signatures_must_all_be_ambient_or_non_ambient: diag(2384, 1 /* Error */, "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", "Overload signatures must all be ambient or non-ambient."),
|
|
7538
7537
|
Overload_signatures_must_all_be_public_private_or_protected: diag(2385, 1 /* Error */, "Overload_signatures_must_all_be_public_private_or_protected_2385", "Overload signatures must all be public, private or protected."),
|
|
@@ -18056,6 +18055,9 @@ ${lanes.join("\n")}
|
|
|
18056
18055
|
function moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution) {
|
|
18057
18056
|
return moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */ || moduleResolution === 100 /* Bundler */;
|
|
18058
18057
|
}
|
|
18058
|
+
function shouldResolveJsRequire(compilerOptions) {
|
|
18059
|
+
return !!compilerOptions.noDtsResolution || getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */;
|
|
18060
|
+
}
|
|
18059
18061
|
function getResolvePackageJsonExports(compilerOptions) {
|
|
18060
18062
|
const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
|
|
18061
18063
|
if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) {
|
|
@@ -38031,7 +38033,8 @@ ${lanes.join("\n")}
|
|
|
38031
38033
|
affectsBuildInfo: true,
|
|
38032
38034
|
category: Diagnostics.Modules,
|
|
38033
38035
|
description: Diagnostics.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,
|
|
38034
|
-
defaultValueDescription: false
|
|
38036
|
+
defaultValueDescription: false,
|
|
38037
|
+
transpileOptionValue: void 0
|
|
38035
38038
|
},
|
|
38036
38039
|
{
|
|
38037
38040
|
name: "resolvePackageJsonExports",
|
|
@@ -43787,7 +43790,7 @@ ${lanes.join("\n")}
|
|
|
43787
43790
|
}
|
|
43788
43791
|
if (!isBindingPattern(node.name)) {
|
|
43789
43792
|
const possibleVariableDecl = node.kind === 258 /* VariableDeclaration */ ? node : node.parent.parent;
|
|
43790
|
-
if (isInJSFile(node) &&
|
|
43793
|
+
if (isInJSFile(node) && shouldResolveJsRequire(options) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) {
|
|
43791
43794
|
declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */);
|
|
43792
43795
|
} else if (isBlockOrCatchScoped(node)) {
|
|
43793
43796
|
bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 111551 /* BlockScopedVariableExcludes */);
|
|
@@ -47354,7 +47357,7 @@ ${lanes.join("\n")}
|
|
|
47354
47357
|
const hasDefaultOnly = isOnlyImportedAsDefault(specifier);
|
|
47355
47358
|
const hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, specifier);
|
|
47356
47359
|
if (!exportDefaultSymbol && !hasSyntheticDefault && !hasDefaultOnly) {
|
|
47357
|
-
if (hasExportAssignmentSymbol(moduleSymbol) && !
|
|
47360
|
+
if (hasExportAssignmentSymbol(moduleSymbol) && !allowSyntheticDefaultImports) {
|
|
47358
47361
|
const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop";
|
|
47359
47362
|
const exportEqualsSymbol = moduleSymbol.exports.get("export=" /* ExportEquals */);
|
|
47360
47363
|
const exportAssignment = exportEqualsSymbol.valueDeclaration;
|
|
@@ -47522,7 +47525,7 @@ ${lanes.join("\n")}
|
|
|
47522
47525
|
if (!isIdentifier(name)) {
|
|
47523
47526
|
return void 0;
|
|
47524
47527
|
}
|
|
47525
|
-
const suppressInteropError = name.escapedText === "default" /* Default */ &&
|
|
47528
|
+
const suppressInteropError = name.escapedText === "default" /* Default */ && allowSyntheticDefaultImports;
|
|
47526
47529
|
const targetSymbol = resolveESModuleSymbol(
|
|
47527
47530
|
moduleSymbol,
|
|
47528
47531
|
moduleSpecifier,
|
|
@@ -52164,7 +52167,7 @@ ${lanes.join("\n")}
|
|
|
52164
52167
|
return;
|
|
52165
52168
|
}
|
|
52166
52169
|
let verbatimTargetName = isShorthandAmbientModuleSymbol(target) && getSomeTargetNameFromDeclarations(symbol.declarations) || unescapeLeadingUnderscores(target.escapedName);
|
|
52167
|
-
if (verbatimTargetName === "export=" /* ExportEquals */ &&
|
|
52170
|
+
if (verbatimTargetName === "export=" /* ExportEquals */ && allowSyntheticDefaultImports) {
|
|
52168
52171
|
verbatimTargetName = "default" /* Default */;
|
|
52169
52172
|
}
|
|
52170
52173
|
const targetName = getInternalSymbolName(target, verbatimTargetName);
|
|
@@ -73387,7 +73390,7 @@ ${lanes.join("\n")}
|
|
|
73387
73390
|
return anyType;
|
|
73388
73391
|
}
|
|
73389
73392
|
}
|
|
73390
|
-
if (isInJSFile(node) &&
|
|
73393
|
+
if (isInJSFile(node) && shouldResolveJsRequire(compilerOptions) && isCommonJsRequire(node)) {
|
|
73391
73394
|
return resolveExternalModuleTypeByLiteral(node.arguments[0]);
|
|
73392
73395
|
}
|
|
73393
73396
|
const returnType = getReturnTypeOfSignature(signature);
|
|
@@ -77092,11 +77095,6 @@ ${lanes.join("\n")}
|
|
|
77092
77095
|
error(getter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter);
|
|
77093
77096
|
error(setter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter);
|
|
77094
77097
|
}
|
|
77095
|
-
const getterType = getAnnotatedAccessorType(getter);
|
|
77096
|
-
const setterType = getAnnotatedAccessorType(setter);
|
|
77097
|
-
if (getterType && setterType) {
|
|
77098
|
-
checkTypeAssignableTo(getterType, setterType, getter, Diagnostics.The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type);
|
|
77099
|
-
}
|
|
77100
77098
|
}
|
|
77101
77099
|
}
|
|
77102
77100
|
const returnType = getTypeOfAccessors(getSymbolOfDeclaration(node));
|
|
@@ -117577,7 +117575,7 @@ ${lanes.join("\n")}
|
|
|
117577
117575
|
false
|
|
117578
117576
|
);
|
|
117579
117577
|
}
|
|
117580
|
-
const shouldProcessRequires = isJavaScriptFile &&
|
|
117578
|
+
const shouldProcessRequires = isJavaScriptFile && shouldResolveJsRequire(options);
|
|
117581
117579
|
if (file.flags & 2097152 /* PossiblyContainsDynamicImport */ || shouldProcessRequires) {
|
|
117582
117580
|
collectDynamicImportOrRequireCalls(file);
|
|
117583
117581
|
}
|
|
@@ -121177,6 +121175,79 @@ ${lanes.join("\n")}
|
|
|
121177
121175
|
}
|
|
121178
121176
|
return true;
|
|
121179
121177
|
}
|
|
121178
|
+
function canWatchAtTypes(atTypes, rootPath) {
|
|
121179
|
+
const dirPath = getDirectoryPath(getDirectoryPath(atTypes));
|
|
121180
|
+
return dirPath === rootPath || canWatchDirectoryOrFile(dirPath);
|
|
121181
|
+
}
|
|
121182
|
+
function isInDirectoryPath(dir, file) {
|
|
121183
|
+
if (dir === void 0 || file.length <= dir.length) {
|
|
121184
|
+
return false;
|
|
121185
|
+
}
|
|
121186
|
+
return startsWith(file, dir) && file[dir.length] === directorySeparator;
|
|
121187
|
+
}
|
|
121188
|
+
function canWatchAffectingLocation(filePath) {
|
|
121189
|
+
return canWatchDirectoryOrFile(filePath);
|
|
121190
|
+
}
|
|
121191
|
+
function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath, rootDir, rootPath, rootSplitLength, getCurrentDirectory) {
|
|
121192
|
+
if (isInDirectoryPath(rootPath, failedLookupLocationPath)) {
|
|
121193
|
+
failedLookupLocation = isRootedDiskPath(failedLookupLocation) ? normalizePath(failedLookupLocation) : getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
|
|
121194
|
+
const failedLookupPathSplit = failedLookupLocationPath.split(directorySeparator);
|
|
121195
|
+
const failedLookupSplit = failedLookupLocation.split(directorySeparator);
|
|
121196
|
+
Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, `FailedLookup: ${failedLookupLocation} failedLookupLocationPath: ${failedLookupLocationPath}`);
|
|
121197
|
+
if (failedLookupPathSplit.length > rootSplitLength + 1) {
|
|
121198
|
+
return {
|
|
121199
|
+
dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(directorySeparator),
|
|
121200
|
+
dirPath: failedLookupPathSplit.slice(0, rootSplitLength + 1).join(directorySeparator)
|
|
121201
|
+
};
|
|
121202
|
+
} else {
|
|
121203
|
+
return {
|
|
121204
|
+
dir: rootDir,
|
|
121205
|
+
dirPath: rootPath,
|
|
121206
|
+
nonRecursive: false
|
|
121207
|
+
};
|
|
121208
|
+
}
|
|
121209
|
+
}
|
|
121210
|
+
return getDirectoryToWatchFromFailedLookupLocationDirectory(
|
|
121211
|
+
getDirectoryPath(getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory())),
|
|
121212
|
+
getDirectoryPath(failedLookupLocationPath),
|
|
121213
|
+
rootPath
|
|
121214
|
+
);
|
|
121215
|
+
}
|
|
121216
|
+
function getDirectoryToWatchFromFailedLookupLocationDirectory(dir, dirPath, rootPath) {
|
|
121217
|
+
while (pathContainsNodeModules(dirPath)) {
|
|
121218
|
+
dir = getDirectoryPath(dir);
|
|
121219
|
+
dirPath = getDirectoryPath(dirPath);
|
|
121220
|
+
}
|
|
121221
|
+
if (isNodeModulesDirectory(dirPath)) {
|
|
121222
|
+
return canWatchDirectoryOrFile(getDirectoryPath(dirPath)) ? { dir, dirPath } : void 0;
|
|
121223
|
+
}
|
|
121224
|
+
let nonRecursive = true;
|
|
121225
|
+
let subDirectoryPath, subDirectory;
|
|
121226
|
+
if (rootPath !== void 0) {
|
|
121227
|
+
while (!isInDirectoryPath(dirPath, rootPath)) {
|
|
121228
|
+
const parentPath = getDirectoryPath(dirPath);
|
|
121229
|
+
if (parentPath === dirPath) {
|
|
121230
|
+
break;
|
|
121231
|
+
}
|
|
121232
|
+
nonRecursive = false;
|
|
121233
|
+
subDirectoryPath = dirPath;
|
|
121234
|
+
subDirectory = dir;
|
|
121235
|
+
dirPath = parentPath;
|
|
121236
|
+
dir = getDirectoryPath(dir);
|
|
121237
|
+
}
|
|
121238
|
+
}
|
|
121239
|
+
return canWatchDirectoryOrFile(dirPath) ? { dir: subDirectory || dir, dirPath: subDirectoryPath || dirPath, nonRecursive } : void 0;
|
|
121240
|
+
}
|
|
121241
|
+
function getDirectoryToWatchFailedLookupLocationFromTypeRoot(typeRoot, typeRootPath, rootPath, filterCustomPath) {
|
|
121242
|
+
if (isInDirectoryPath(rootPath, typeRootPath)) {
|
|
121243
|
+
return rootPath;
|
|
121244
|
+
}
|
|
121245
|
+
const toWatch = getDirectoryToWatchFromFailedLookupLocationDirectory(typeRoot, typeRootPath, rootPath);
|
|
121246
|
+
return toWatch && filterCustomPath(toWatch.dirPath) ? toWatch.dirPath : void 0;
|
|
121247
|
+
}
|
|
121248
|
+
function getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirectory) {
|
|
121249
|
+
return rootDirForResolution && removeTrailingDirectorySeparator(getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory()));
|
|
121250
|
+
}
|
|
121180
121251
|
function createResolutionCache(resolutionHost, rootDirForResolution, logChangesWhenResolvingModule) {
|
|
121181
121252
|
let filesWithChangedSetOfUnresolvedImports;
|
|
121182
121253
|
let filesWithInvalidatedResolutions;
|
|
@@ -121211,7 +121282,7 @@ ${lanes.join("\n")}
|
|
|
121211
121282
|
const customFailedLookupPaths = /* @__PURE__ */ new Map();
|
|
121212
121283
|
const directoryWatchesOfFailedLookups = /* @__PURE__ */ new Map();
|
|
121213
121284
|
const fileWatchesOfAffectingLocations = /* @__PURE__ */ new Map();
|
|
121214
|
-
const rootDir =
|
|
121285
|
+
const rootDir = getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirectory);
|
|
121215
121286
|
const rootPath = rootDir && resolutionHost.toPath(rootDir);
|
|
121216
121287
|
const rootSplitLength = rootPath !== void 0 ? rootPath.split(directorySeparator).length : 0;
|
|
121217
121288
|
const typeRootsWatches = /* @__PURE__ */ new Map();
|
|
@@ -121244,12 +121315,6 @@ ${lanes.join("\n")}
|
|
|
121244
121315
|
function getResolvedTypeReferenceDirective2(resolution) {
|
|
121245
121316
|
return resolution.resolvedTypeReferenceDirective;
|
|
121246
121317
|
}
|
|
121247
|
-
function isInDirectoryPath(dir, file) {
|
|
121248
|
-
if (dir === void 0 || file.length <= dir.length) {
|
|
121249
|
-
return false;
|
|
121250
|
-
}
|
|
121251
|
-
return startsWith(file, dir) && file[dir.length] === directorySeparator;
|
|
121252
|
-
}
|
|
121253
121318
|
function clear2() {
|
|
121254
121319
|
clearMap(directoryWatchesOfFailedLookups, closeFileWatcherOf);
|
|
121255
121320
|
clearMap(fileWatchesOfAffectingLocations, closeFileWatcherOf);
|
|
@@ -121533,55 +121598,6 @@ ${lanes.join("\n")}
|
|
|
121533
121598
|
function isNodeModulesAtTypesDirectory(dirPath) {
|
|
121534
121599
|
return endsWith(dirPath, "/node_modules/@types");
|
|
121535
121600
|
}
|
|
121536
|
-
function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath) {
|
|
121537
|
-
if (isInDirectoryPath(rootPath, failedLookupLocationPath)) {
|
|
121538
|
-
failedLookupLocation = isRootedDiskPath(failedLookupLocation) ? normalizePath(failedLookupLocation) : getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
|
|
121539
|
-
const failedLookupPathSplit = failedLookupLocationPath.split(directorySeparator);
|
|
121540
|
-
const failedLookupSplit = failedLookupLocation.split(directorySeparator);
|
|
121541
|
-
Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, `FailedLookup: ${failedLookupLocation} failedLookupLocationPath: ${failedLookupLocationPath}`);
|
|
121542
|
-
if (failedLookupPathSplit.length > rootSplitLength + 1) {
|
|
121543
|
-
return {
|
|
121544
|
-
dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(directorySeparator),
|
|
121545
|
-
dirPath: failedLookupPathSplit.slice(0, rootSplitLength + 1).join(directorySeparator)
|
|
121546
|
-
};
|
|
121547
|
-
} else {
|
|
121548
|
-
return {
|
|
121549
|
-
dir: rootDir,
|
|
121550
|
-
dirPath: rootPath,
|
|
121551
|
-
nonRecursive: false
|
|
121552
|
-
};
|
|
121553
|
-
}
|
|
121554
|
-
}
|
|
121555
|
-
return getDirectoryToWatchFromFailedLookupLocationDirectory(
|
|
121556
|
-
getDirectoryPath(getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory())),
|
|
121557
|
-
getDirectoryPath(failedLookupLocationPath)
|
|
121558
|
-
);
|
|
121559
|
-
}
|
|
121560
|
-
function getDirectoryToWatchFromFailedLookupLocationDirectory(dir, dirPath) {
|
|
121561
|
-
while (pathContainsNodeModules(dirPath)) {
|
|
121562
|
-
dir = getDirectoryPath(dir);
|
|
121563
|
-
dirPath = getDirectoryPath(dirPath);
|
|
121564
|
-
}
|
|
121565
|
-
if (isNodeModulesDirectory(dirPath)) {
|
|
121566
|
-
return canWatchDirectoryOrFile(getDirectoryPath(dirPath)) ? { dir, dirPath } : void 0;
|
|
121567
|
-
}
|
|
121568
|
-
let nonRecursive = true;
|
|
121569
|
-
let subDirectoryPath, subDirectory;
|
|
121570
|
-
if (rootPath !== void 0) {
|
|
121571
|
-
while (!isInDirectoryPath(dirPath, rootPath)) {
|
|
121572
|
-
const parentPath = getDirectoryPath(dirPath);
|
|
121573
|
-
if (parentPath === dirPath) {
|
|
121574
|
-
break;
|
|
121575
|
-
}
|
|
121576
|
-
nonRecursive = false;
|
|
121577
|
-
subDirectoryPath = dirPath;
|
|
121578
|
-
subDirectory = dir;
|
|
121579
|
-
dirPath = parentPath;
|
|
121580
|
-
dir = getDirectoryPath(dir);
|
|
121581
|
-
}
|
|
121582
|
-
}
|
|
121583
|
-
return canWatchDirectoryOrFile(dirPath) ? { dir: subDirectory || dir, dirPath: subDirectoryPath || dirPath, nonRecursive } : void 0;
|
|
121584
|
-
}
|
|
121585
121601
|
function isPathWithDefaultFailedLookupExtension(path) {
|
|
121586
121602
|
return fileExtensionIsOneOf(path, failedLookupDefaultExtensions);
|
|
121587
121603
|
}
|
|
@@ -121620,7 +121636,14 @@ ${lanes.join("\n")}
|
|
|
121620
121636
|
if (failedLookupLocations) {
|
|
121621
121637
|
for (const failedLookupLocation of failedLookupLocations) {
|
|
121622
121638
|
const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation);
|
|
121623
|
-
const toWatch = getDirectoryToWatchFailedLookupLocation(
|
|
121639
|
+
const toWatch = getDirectoryToWatchFailedLookupLocation(
|
|
121640
|
+
failedLookupLocation,
|
|
121641
|
+
failedLookupLocationPath,
|
|
121642
|
+
rootDir,
|
|
121643
|
+
rootPath,
|
|
121644
|
+
rootSplitLength,
|
|
121645
|
+
getCurrentDirectory
|
|
121646
|
+
);
|
|
121624
121647
|
if (toWatch) {
|
|
121625
121648
|
const { dir, dirPath, nonRecursive } = toWatch;
|
|
121626
121649
|
if (!isPathWithDefaultFailedLookupExtension(failedLookupLocationPath)) {
|
|
@@ -121688,7 +121711,7 @@ ${lanes.join("\n")}
|
|
|
121688
121711
|
}
|
|
121689
121712
|
const paths = /* @__PURE__ */ new Set();
|
|
121690
121713
|
paths.add(locationToWatch);
|
|
121691
|
-
let actualWatcher =
|
|
121714
|
+
let actualWatcher = canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => {
|
|
121692
121715
|
cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind);
|
|
121693
121716
|
const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
|
|
121694
121717
|
paths.forEach((path) => {
|
|
@@ -121756,7 +121779,14 @@ ${lanes.join("\n")}
|
|
|
121756
121779
|
let removeAtRoot = false;
|
|
121757
121780
|
for (const failedLookupLocation of failedLookupLocations) {
|
|
121758
121781
|
const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation);
|
|
121759
|
-
const toWatch = getDirectoryToWatchFailedLookupLocation(
|
|
121782
|
+
const toWatch = getDirectoryToWatchFailedLookupLocation(
|
|
121783
|
+
failedLookupLocation,
|
|
121784
|
+
failedLookupLocationPath,
|
|
121785
|
+
rootDir,
|
|
121786
|
+
rootPath,
|
|
121787
|
+
rootSplitLength,
|
|
121788
|
+
getCurrentDirectory
|
|
121789
|
+
);
|
|
121760
121790
|
if (toWatch) {
|
|
121761
121791
|
const { dirPath } = toWatch;
|
|
121762
121792
|
const refCount = customFailedLookupPaths.get(failedLookupLocationPath);
|
|
@@ -121924,13 +121954,6 @@ ${lanes.join("\n")}
|
|
|
121924
121954
|
function closeTypeRootsWatch() {
|
|
121925
121955
|
clearMap(typeRootsWatches, closeFileWatcher);
|
|
121926
121956
|
}
|
|
121927
|
-
function getDirectoryToWatchFailedLookupLocationFromTypeRoot(typeRoot, typeRootPath) {
|
|
121928
|
-
if (isInDirectoryPath(rootPath, typeRootPath)) {
|
|
121929
|
-
return rootPath;
|
|
121930
|
-
}
|
|
121931
|
-
const toWatch = getDirectoryToWatchFromFailedLookupLocationDirectory(typeRoot, typeRootPath);
|
|
121932
|
-
return toWatch && directoryWatchesOfFailedLookups.has(toWatch.dirPath) ? toWatch.dirPath : void 0;
|
|
121933
|
-
}
|
|
121934
121957
|
function createTypeRootsWatch(typeRootPath, typeRoot) {
|
|
121935
121958
|
return canWatchTypeRootPath(typeRootPath) ? resolutionHost.watchTypeRootsDirectory(typeRoot, (fileOrDirectory) => {
|
|
121936
121959
|
const fileOrDirectoryPath = resolutionHost.toPath(fileOrDirectory);
|
|
@@ -121939,7 +121962,12 @@ ${lanes.join("\n")}
|
|
|
121939
121962
|
}
|
|
121940
121963
|
hasChangedAutomaticTypeDirectiveNames = true;
|
|
121941
121964
|
resolutionHost.onChangedAutomaticTypeDirectiveNames();
|
|
121942
|
-
const dirPath = getDirectoryToWatchFailedLookupLocationFromTypeRoot(
|
|
121965
|
+
const dirPath = getDirectoryToWatchFailedLookupLocationFromTypeRoot(
|
|
121966
|
+
typeRoot,
|
|
121967
|
+
typeRootPath,
|
|
121968
|
+
rootPath,
|
|
121969
|
+
(dirPath2) => directoryWatchesOfFailedLookups.has(dirPath2)
|
|
121970
|
+
);
|
|
121943
121971
|
if (dirPath) {
|
|
121944
121972
|
scheduleInvalidateResolutionOfFailedLookupLocation(fileOrDirectoryPath, dirPath === fileOrDirectoryPath);
|
|
121945
121973
|
}
|
|
@@ -121965,12 +121993,10 @@ ${lanes.join("\n")}
|
|
|
121965
121993
|
closeTypeRootsWatch();
|
|
121966
121994
|
}
|
|
121967
121995
|
}
|
|
121968
|
-
function canWatchTypeRootPath(
|
|
121996
|
+
function canWatchTypeRootPath(typeRoot) {
|
|
121969
121997
|
if (resolutionHost.getCompilationSettings().typeRoots)
|
|
121970
121998
|
return true;
|
|
121971
|
-
|
|
121972
|
-
const dirPath = resolutionHost.toPath(dir);
|
|
121973
|
-
return dirPath === rootPath || canWatchDirectoryOrFile(dirPath);
|
|
121999
|
+
return canWatchAtTypes(resolutionHost.toPath(typeRoot), rootPath);
|
|
121974
122000
|
}
|
|
121975
122001
|
}
|
|
121976
122002
|
function resolutionIsSymlink(resolution) {
|
|
@@ -123043,7 +123069,7 @@ ${lanes.join("\n")}
|
|
|
123043
123069
|
}
|
|
123044
123070
|
const pending = clearInvalidateResolutionsOfFailedLookupLocations();
|
|
123045
123071
|
writeLog(`Scheduling invalidateFailedLookup${pending ? ", Cancelled earlier one" : ""}`);
|
|
123046
|
-
timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250);
|
|
123072
|
+
timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250, "timerToInvalidateFailedLookupResolutions");
|
|
123047
123073
|
}
|
|
123048
123074
|
function invalidateResolutionsOfFailedLookup() {
|
|
123049
123075
|
timerToInvalidateFailedLookupResolutions = void 0;
|
|
@@ -123059,7 +123085,7 @@ ${lanes.join("\n")}
|
|
|
123059
123085
|
host.clearTimeout(timerToUpdateProgram);
|
|
123060
123086
|
}
|
|
123061
123087
|
writeLog("Scheduling update");
|
|
123062
|
-
timerToUpdateProgram = host.setTimeout(updateProgramWithWatchStatus, 250);
|
|
123088
|
+
timerToUpdateProgram = host.setTimeout(updateProgramWithWatchStatus, 250, "timerToUpdateProgram");
|
|
123063
123089
|
}
|
|
123064
123090
|
function scheduleProgramReload() {
|
|
123065
123091
|
Debug.assert(!!configFileName);
|
|
@@ -124969,9 +124995,9 @@ ${lanes.join("\n")}
|
|
|
124969
124995
|
if (state.timerToBuildInvalidatedProject) {
|
|
124970
124996
|
hostWithWatch.clearTimeout(state.timerToBuildInvalidatedProject);
|
|
124971
124997
|
}
|
|
124972
|
-
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, state, changeDetected);
|
|
124998
|
+
state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, "timerToBuildInvalidatedProject", state, changeDetected);
|
|
124973
124999
|
}
|
|
124974
|
-
function buildNextInvalidatedProject(state, changeDetected) {
|
|
125000
|
+
function buildNextInvalidatedProject(_timeoutType, state, changeDetected) {
|
|
124975
125001
|
mark("SolutionBuilder::beforeBuild");
|
|
124976
125002
|
const buildOrder = buildNextInvalidatedProjectWorker(state, changeDetected);
|
|
124977
125003
|
mark("SolutionBuilder::afterBuild");
|
|
@@ -129053,7 +129079,7 @@ ${lanes.join("\n")}
|
|
|
129053
129079
|
// Adding or removing imports from node could change the outcome of that guess, so could change the suggestions list.
|
|
129054
129080
|
typeAcquisitionEnabled && consumesNodeCoreModules(oldSourceFile) !== consumesNodeCoreModules(newSourceFile) || // Module agumentation and ambient module changes can add or remove exports available to be auto-imported.
|
|
129055
129081
|
// Changes elsewhere in the file can change the *type* of an export in a module augmentation,
|
|
129056
|
-
// but type info is gathered in getCompletionEntryDetails, which doesn
|
|
129082
|
+
// but type info is gathered in getCompletionEntryDetails, which doesn't use the cache.
|
|
129057
129083
|
!arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations) || !ambientModuleDeclarationsAreEqual(oldSourceFile, newSourceFile)) {
|
|
129058
129084
|
cache.clear();
|
|
129059
129085
|
return true;
|
|
@@ -137818,7 +137844,7 @@ ${lanes.join("\n")}
|
|
|
137818
137844
|
function symbolReferenceIsAlsoMissingAwait(reference, diagnostics, sourceFile, checker) {
|
|
137819
137845
|
const errorNode = isPropertyAccessExpression(reference.parent) ? reference.parent.name : isBinaryExpression(reference.parent) ? reference.parent : reference;
|
|
137820
137846
|
const diagnostic = find(diagnostics, (diagnostic2) => diagnostic2.start === errorNode.getStart(sourceFile) && diagnostic2.start + diagnostic2.length === errorNode.getEnd());
|
|
137821
|
-
return diagnostic && contains(errorCodes3, diagnostic.code) || // A Promise is usually not correct in a binary expression (it
|
|
137847
|
+
return diagnostic && contains(errorCodes3, diagnostic.code) || // A Promise is usually not correct in a binary expression (it's not valid
|
|
137822
137848
|
// in an arithmetic expression and an equality comparison seems unusual),
|
|
137823
137849
|
// but if the other side of the binary expression has an error, the side
|
|
137824
137850
|
// is typed `any` which will squash the error that would identify this
|
|
@@ -140727,7 +140753,6 @@ ${lanes.join("\n")}
|
|
|
140727
140753
|
importClauseOrBindingPattern,
|
|
140728
140754
|
defaultImport,
|
|
140729
140755
|
arrayFrom(namedImports.entries(), ([name, addAsTypeOnly]) => ({ addAsTypeOnly, name })),
|
|
140730
|
-
compilerOptions,
|
|
140731
140756
|
preferences
|
|
140732
140757
|
);
|
|
140733
140758
|
});
|
|
@@ -140925,7 +140950,19 @@ ${lanes.join("\n")}
|
|
|
140925
140950
|
return 1 /* Allowed */;
|
|
140926
140951
|
}
|
|
140927
140952
|
function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker, compilerOptions) {
|
|
140928
|
-
|
|
140953
|
+
let best;
|
|
140954
|
+
for (const existingImport of existingImports) {
|
|
140955
|
+
const fix = getAddToExistingImportFix(existingImport);
|
|
140956
|
+
if (!fix)
|
|
140957
|
+
continue;
|
|
140958
|
+
const isTypeOnly = isTypeOnlyImportDeclaration(fix.importClauseOrBindingPattern);
|
|
140959
|
+
if (fix.addAsTypeOnly !== 4 /* NotAllowed */ && isTypeOnly || fix.addAsTypeOnly === 4 /* NotAllowed */ && !isTypeOnly) {
|
|
140960
|
+
return fix;
|
|
140961
|
+
}
|
|
140962
|
+
best != null ? best : best = fix;
|
|
140963
|
+
}
|
|
140964
|
+
return best;
|
|
140965
|
+
function getAddToExistingImportFix({ declaration, importKind, symbol, targetFlags }) {
|
|
140929
140966
|
if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 269 /* ImportEqualsDeclaration */) {
|
|
140930
140967
|
return void 0;
|
|
140931
140968
|
}
|
|
@@ -140933,11 +140970,13 @@ ${lanes.join("\n")}
|
|
|
140933
140970
|
return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 204 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0;
|
|
140934
140971
|
}
|
|
140935
140972
|
const { importClause } = declaration;
|
|
140936
|
-
if (!importClause || !isStringLiteralLike(declaration.moduleSpecifier))
|
|
140973
|
+
if (!importClause || !isStringLiteralLike(declaration.moduleSpecifier)) {
|
|
140937
140974
|
return void 0;
|
|
140975
|
+
}
|
|
140938
140976
|
const { name, namedBindings } = importClause;
|
|
140939
|
-
if (importClause.isTypeOnly && !(importKind === 0 /* Named */ && namedBindings))
|
|
140977
|
+
if (importClause.isTypeOnly && !(importKind === 0 /* Named */ && namedBindings)) {
|
|
140940
140978
|
return void 0;
|
|
140979
|
+
}
|
|
140941
140980
|
const addAsTypeOnly = getAddAsTypeOnly(
|
|
140942
140981
|
isValidTypeOnlyUseSite,
|
|
140943
140982
|
/*isForNewImportDeclaration*/
|
|
@@ -140948,10 +140987,12 @@ ${lanes.join("\n")}
|
|
|
140948
140987
|
compilerOptions
|
|
140949
140988
|
);
|
|
140950
140989
|
if (importKind === 1 /* Default */ && (name || // Cannot add a default import to a declaration that already has one
|
|
140951
|
-
addAsTypeOnly === 2 /* Required */ && namedBindings))
|
|
140990
|
+
addAsTypeOnly === 2 /* Required */ && namedBindings)) {
|
|
140952
140991
|
return void 0;
|
|
140953
|
-
|
|
140992
|
+
}
|
|
140993
|
+
if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 272 /* NamespaceImport */) {
|
|
140954
140994
|
return void 0;
|
|
140995
|
+
}
|
|
140955
140996
|
return {
|
|
140956
140997
|
kind: 2 /* AddToExisting */,
|
|
140957
140998
|
importClauseOrBindingPattern: importClause,
|
|
@@ -140959,7 +141000,7 @@ ${lanes.join("\n")}
|
|
|
140959
141000
|
moduleSpecifier: declaration.moduleSpecifier.text,
|
|
140960
141001
|
addAsTypeOnly
|
|
140961
141002
|
};
|
|
140962
|
-
}
|
|
141003
|
+
}
|
|
140963
141004
|
}
|
|
140964
141005
|
function createExistingImportMap(checker, importingFile, compilerOptions) {
|
|
140965
141006
|
let importMap;
|
|
@@ -141388,7 +141429,6 @@ ${lanes.join("\n")}
|
|
|
141388
141429
|
importClauseOrBindingPattern,
|
|
141389
141430
|
importKind === 1 /* Default */ ? { name: symbolName2, addAsTypeOnly } : void 0,
|
|
141390
141431
|
importKind === 0 /* Named */ ? [{ name: symbolName2, addAsTypeOnly }] : emptyArray,
|
|
141391
|
-
compilerOptions,
|
|
141392
141432
|
preferences
|
|
141393
141433
|
);
|
|
141394
141434
|
const moduleSpecifierWithoutQuotes = stripQuotes(moduleSpecifier);
|
|
@@ -141490,7 +141530,7 @@ ${lanes.join("\n")}
|
|
|
141490
141530
|
}
|
|
141491
141531
|
}
|
|
141492
141532
|
}
|
|
141493
|
-
function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports,
|
|
141533
|
+
function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, preferences) {
|
|
141494
141534
|
var _a2;
|
|
141495
141535
|
if (clause.kind === 204 /* ObjectBindingPattern */) {
|
|
141496
141536
|
if (defaultImport) {
|
|
@@ -141508,7 +141548,6 @@ ${lanes.join("\n")}
|
|
|
141508
141548
|
}
|
|
141509
141549
|
const promoteFromTypeOnly2 = clause.isTypeOnly && some([defaultImport, ...namedImports], (i) => (i == null ? void 0 : i.addAsTypeOnly) === 4 /* NotAllowed */);
|
|
141510
141550
|
const existingSpecifiers = clause.namedBindings && ((_a2 = tryCast(clause.namedBindings, isNamedImports)) == null ? void 0 : _a2.elements);
|
|
141511
|
-
const convertExistingToTypeOnly = promoteFromTypeOnly2 && importNameElisionDisabled(compilerOptions);
|
|
141512
141551
|
if (defaultImport) {
|
|
141513
141552
|
Debug.assert(!clause.name, "Cannot add a default import to an import clause that already has one");
|
|
141514
141553
|
changes.insertNodeAt(sourceFile, clause.getStart(sourceFile), factory.createIdentifier(defaultImport.name), { suffix: ", " });
|
|
@@ -141539,7 +141578,7 @@ ${lanes.join("\n")}
|
|
|
141539
141578
|
const specifierSort = (existingSpecifiers == null ? void 0 : existingSpecifiers.length) && ts_OrganizeImports_exports.detectImportSpecifierSorting(existingSpecifiers, preferences);
|
|
141540
141579
|
if (specifierSort && !(ignoreCaseForSorting && specifierSort === 1 /* CaseSensitive */)) {
|
|
141541
141580
|
for (const spec of newSpecifiers) {
|
|
141542
|
-
const insertionIndex =
|
|
141581
|
+
const insertionIndex = promoteFromTypeOnly2 && !spec.isTypeOnly ? 0 : ts_OrganizeImports_exports.getImportSpecifierInsertionIndex(existingSpecifiers, spec, comparer);
|
|
141543
141582
|
changes.insertImportSpecifierAtIndex(sourceFile, spec, clause.namedBindings, insertionIndex);
|
|
141544
141583
|
}
|
|
141545
141584
|
} else if (existingSpecifiers == null ? void 0 : existingSpecifiers.length) {
|
|
@@ -141559,7 +141598,7 @@ ${lanes.join("\n")}
|
|
|
141559
141598
|
}
|
|
141560
141599
|
if (promoteFromTypeOnly2) {
|
|
141561
141600
|
changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(clause, sourceFile));
|
|
141562
|
-
if (
|
|
141601
|
+
if (existingSpecifiers) {
|
|
141563
141602
|
for (const specifier of existingSpecifiers) {
|
|
141564
141603
|
changes.insertModifierBefore(sourceFile, 155 /* TypeKeyword */, specifier);
|
|
141565
141604
|
}
|
|
@@ -153762,7 +153801,7 @@ ${lanes.join("\n")}
|
|
|
153762
153801
|
*/
|
|
153763
153802
|
this.markSeenReExportRHS = nodeSeenTracker();
|
|
153764
153803
|
this.symbolIdToReferences = [];
|
|
153765
|
-
// Source file ID
|
|
153804
|
+
// Source file ID -> symbol ID -> Whether the symbol has been searched for in the source file.
|
|
153766
153805
|
this.sourceFileToSeenSymbols = [];
|
|
153767
153806
|
}
|
|
153768
153807
|
includesSourceFile(sourceFile) {
|
|
@@ -162906,7 +162945,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162906
162945
|
if (start !== end) {
|
|
162907
162946
|
const textSpan = createTextSpanFromBounds(start, end);
|
|
162908
162947
|
if (!selectionRange || // Skip ranges that are identical to the parent
|
|
162909
|
-
!textSpansEqual(textSpan, selectionRange.textSpan) && // Skip ranges that don
|
|
162948
|
+
!textSpansEqual(textSpan, selectionRange.textSpan) && // Skip ranges that don't contain the original position
|
|
162910
162949
|
textSpanIntersectsWithPosition(textSpan, pos)) {
|
|
162911
162950
|
selectionRange = { textSpan, ...selectionRange && { parent: selectionRange } };
|
|
162912
162951
|
}
|
|
@@ -168202,7 +168241,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
168202
168241
|
if (pendingTimeout) {
|
|
168203
168242
|
this.host.clearTimeout(pendingTimeout);
|
|
168204
168243
|
}
|
|
168205
|
-
this.pendingTimeouts.set(operationId, this.host.setTimeout(ThrottledOperations.run, delay,
|
|
168244
|
+
this.pendingTimeouts.set(operationId, this.host.setTimeout(ThrottledOperations.run, delay, operationId, this, cb));
|
|
168206
168245
|
if (this.logger) {
|
|
168207
168246
|
this.logger.info(`Scheduled: ${operationId}${pendingTimeout ? ", Cancelled earlier one" : ""}`);
|
|
168208
168247
|
}
|
|
@@ -168214,7 +168253,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
168214
168253
|
this.host.clearTimeout(pendingTimeout);
|
|
168215
168254
|
return this.pendingTimeouts.delete(operationId);
|
|
168216
168255
|
}
|
|
168217
|
-
static run(
|
|
168256
|
+
static run(operationId, self, cb) {
|
|
168218
168257
|
var _a2, _b;
|
|
168219
168258
|
(_a2 = perfLogger) == null ? void 0 : _a2.logStartScheduledOperation(operationId);
|
|
168220
168259
|
self.pendingTimeouts.delete(operationId);
|
|
@@ -175238,21 +175277,21 @@ ${json}${newLine}`;
|
|
|
175238
175277
|
this.setTimerHandle(void 0);
|
|
175239
175278
|
this.setImmediateId(void 0);
|
|
175240
175279
|
}
|
|
175241
|
-
immediate(action) {
|
|
175280
|
+
immediate(actionType, action) {
|
|
175242
175281
|
const requestId = this.requestId;
|
|
175243
175282
|
Debug.assert(requestId === this.operationHost.getCurrentRequestId(), "immediate: incorrect request id");
|
|
175244
175283
|
this.setImmediateId(this.operationHost.getServerHost().setImmediate(() => {
|
|
175245
175284
|
this.immediateId = void 0;
|
|
175246
175285
|
this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action));
|
|
175247
|
-
}));
|
|
175286
|
+
}, actionType));
|
|
175248
175287
|
}
|
|
175249
|
-
delay(ms, action) {
|
|
175288
|
+
delay(actionType, ms, action) {
|
|
175250
175289
|
const requestId = this.requestId;
|
|
175251
175290
|
Debug.assert(requestId === this.operationHost.getCurrentRequestId(), "delay: incorrect request id");
|
|
175252
175291
|
this.setTimerHandle(this.operationHost.getServerHost().setTimeout(() => {
|
|
175253
175292
|
this.timerHandle = void 0;
|
|
175254
175293
|
this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action));
|
|
175255
|
-
}, ms));
|
|
175294
|
+
}, ms, actionType));
|
|
175256
175295
|
}
|
|
175257
175296
|
executeAction(action) {
|
|
175258
175297
|
var _a2, _b, _c, _d, _e, _f;
|
|
@@ -176289,7 +176328,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
176289
176328
|
const goNext = () => {
|
|
176290
176329
|
index++;
|
|
176291
176330
|
if (checkList.length > index) {
|
|
176292
|
-
next.delay(followMs, checkOne);
|
|
176331
|
+
next.delay("checkOne", followMs, checkOne);
|
|
176293
176332
|
}
|
|
176294
176333
|
};
|
|
176295
176334
|
const checkOne = () => {
|
|
@@ -176317,7 +176356,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
176317
176356
|
goNext();
|
|
176318
176357
|
return;
|
|
176319
176358
|
}
|
|
176320
|
-
next.immediate(() => {
|
|
176359
|
+
next.immediate("semanticCheck", () => {
|
|
176321
176360
|
this.semanticCheck(fileName, project);
|
|
176322
176361
|
if (this.changeSeq !== seq) {
|
|
176323
176362
|
return;
|
|
@@ -176326,14 +176365,14 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
176326
176365
|
goNext();
|
|
176327
176366
|
return;
|
|
176328
176367
|
}
|
|
176329
|
-
next.immediate(() => {
|
|
176368
|
+
next.immediate("suggestionCheck", () => {
|
|
176330
176369
|
this.suggestionCheck(fileName, project);
|
|
176331
176370
|
goNext();
|
|
176332
176371
|
});
|
|
176333
176372
|
});
|
|
176334
176373
|
};
|
|
176335
176374
|
if (checkList.length > index && this.changeSeq === seq) {
|
|
176336
|
-
next.delay(ms, checkOne);
|
|
176375
|
+
next.delay("checkOne", ms, checkOne);
|
|
176337
176376
|
}
|
|
176338
176377
|
}
|
|
176339
176378
|
cleanProjects(caption, projects) {
|
|
@@ -179125,6 +179164,8 @@ ${e.message}`;
|
|
|
179125
179164
|
canJsonReportNoInputFiles: () => canJsonReportNoInputFiles,
|
|
179126
179165
|
canProduceDiagnostics: () => canProduceDiagnostics,
|
|
179127
179166
|
canUsePropertyAccess: () => canUsePropertyAccess,
|
|
179167
|
+
canWatchAffectingLocation: () => canWatchAffectingLocation,
|
|
179168
|
+
canWatchAtTypes: () => canWatchAtTypes,
|
|
179128
179169
|
canWatchDirectoryOrFile: () => canWatchDirectoryOrFile,
|
|
179129
179170
|
cartesianProduct: () => cartesianProduct,
|
|
179130
179171
|
cast: () => cast,
|
|
@@ -179572,6 +179613,8 @@ ${e.message}`;
|
|
|
179572
179613
|
getDiagnosticText: () => getDiagnosticText,
|
|
179573
179614
|
getDiagnosticsWithinSpan: () => getDiagnosticsWithinSpan,
|
|
179574
179615
|
getDirectoryPath: () => getDirectoryPath,
|
|
179616
|
+
getDirectoryToWatchFailedLookupLocation: () => getDirectoryToWatchFailedLookupLocation,
|
|
179617
|
+
getDirectoryToWatchFailedLookupLocationFromTypeRoot: () => getDirectoryToWatchFailedLookupLocationFromTypeRoot,
|
|
179575
179618
|
getDocumentPositionMapper: () => getDocumentPositionMapper,
|
|
179576
179619
|
getESModuleInterop: () => getESModuleInterop,
|
|
179577
179620
|
getEditsForFileRename: () => getEditsForFileRename,
|
|
@@ -179841,6 +179884,7 @@ ${e.message}`;
|
|
|
179841
179884
|
getRestParameterElementType: () => getRestParameterElementType,
|
|
179842
179885
|
getRightMostAssignedExpression: () => getRightMostAssignedExpression,
|
|
179843
179886
|
getRootDeclaration: () => getRootDeclaration,
|
|
179887
|
+
getRootDirectoryOfResolutionCache: () => getRootDirectoryOfResolutionCache,
|
|
179844
179888
|
getRootLength: () => getRootLength,
|
|
179845
179889
|
getScriptKind: () => getScriptKind,
|
|
179846
179890
|
getScriptKindFromFileName: () => getScriptKindFromFileName,
|
|
@@ -180938,6 +180982,7 @@ ${e.message}`;
|
|
|
180938
180982
|
setValueDeclaration: () => setValueDeclaration,
|
|
180939
180983
|
shouldAllowImportingTsExtension: () => shouldAllowImportingTsExtension,
|
|
180940
180984
|
shouldPreserveConstEnums: () => shouldPreserveConstEnums,
|
|
180985
|
+
shouldResolveJsRequire: () => shouldResolveJsRequire,
|
|
180941
180986
|
shouldUseUriStyleNodeCoreModules: () => shouldUseUriStyleNodeCoreModules,
|
|
180942
180987
|
showModuleSpecifier: () => showModuleSpecifier,
|
|
180943
180988
|
signatureHasLiteralTypes: () => signatureHasLiteralTypes,
|
|
@@ -181484,6 +181529,8 @@ ${e.message}`;
|
|
|
181484
181529
|
canJsonReportNoInputFiles: () => canJsonReportNoInputFiles,
|
|
181485
181530
|
canProduceDiagnostics: () => canProduceDiagnostics,
|
|
181486
181531
|
canUsePropertyAccess: () => canUsePropertyAccess,
|
|
181532
|
+
canWatchAffectingLocation: () => canWatchAffectingLocation,
|
|
181533
|
+
canWatchAtTypes: () => canWatchAtTypes,
|
|
181487
181534
|
canWatchDirectoryOrFile: () => canWatchDirectoryOrFile,
|
|
181488
181535
|
cartesianProduct: () => cartesianProduct,
|
|
181489
181536
|
cast: () => cast,
|
|
@@ -181931,6 +181978,8 @@ ${e.message}`;
|
|
|
181931
181978
|
getDiagnosticText: () => getDiagnosticText,
|
|
181932
181979
|
getDiagnosticsWithinSpan: () => getDiagnosticsWithinSpan,
|
|
181933
181980
|
getDirectoryPath: () => getDirectoryPath,
|
|
181981
|
+
getDirectoryToWatchFailedLookupLocation: () => getDirectoryToWatchFailedLookupLocation,
|
|
181982
|
+
getDirectoryToWatchFailedLookupLocationFromTypeRoot: () => getDirectoryToWatchFailedLookupLocationFromTypeRoot,
|
|
181934
181983
|
getDocumentPositionMapper: () => getDocumentPositionMapper,
|
|
181935
181984
|
getESModuleInterop: () => getESModuleInterop,
|
|
181936
181985
|
getEditsForFileRename: () => getEditsForFileRename,
|
|
@@ -182200,6 +182249,7 @@ ${e.message}`;
|
|
|
182200
182249
|
getRestParameterElementType: () => getRestParameterElementType,
|
|
182201
182250
|
getRightMostAssignedExpression: () => getRightMostAssignedExpression,
|
|
182202
182251
|
getRootDeclaration: () => getRootDeclaration,
|
|
182252
|
+
getRootDirectoryOfResolutionCache: () => getRootDirectoryOfResolutionCache,
|
|
182203
182253
|
getRootLength: () => getRootLength,
|
|
182204
182254
|
getScriptKind: () => getScriptKind,
|
|
182205
182255
|
getScriptKindFromFileName: () => getScriptKindFromFileName,
|
|
@@ -183297,6 +183347,7 @@ ${e.message}`;
|
|
|
183297
183347
|
setValueDeclaration: () => setValueDeclaration,
|
|
183298
183348
|
shouldAllowImportingTsExtension: () => shouldAllowImportingTsExtension,
|
|
183299
183349
|
shouldPreserveConstEnums: () => shouldPreserveConstEnums,
|
|
183350
|
+
shouldResolveJsRequire: () => shouldResolveJsRequire,
|
|
183300
183351
|
shouldUseUriStyleNodeCoreModules: () => shouldUseUriStyleNodeCoreModules,
|
|
183301
183352
|
showModuleSpecifier: () => showModuleSpecifier,
|
|
183302
183353
|
signatureHasLiteralTypes: () => signatureHasLiteralTypes,
|