typescript 5.0.0-dev.20221205 → 5.0.0-dev.20221206
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 +421 -299
- package/lib/tsserver.js +468 -322
- package/lib/tsserverlibrary.d.ts +27 -18
- package/lib/tsserverlibrary.js +469 -323
- package/lib/typescript.d.ts +27 -15
- package/lib/typescript.js +448 -306
- package/lib/typingsInstaller.js +20 -8
- 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-dev.
|
|
45
|
+
version = `${versionMajorMinor}.0-dev.20221206`;
|
|
46
46
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
47
47
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
48
48
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -4097,6 +4097,7 @@ ${lanes.join("\n")}
|
|
|
4097
4097
|
FilePreprocessingDiagnosticsKind = /* @__PURE__ */ ((FilePreprocessingDiagnosticsKind2) => {
|
|
4098
4098
|
FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["FilePreprocessingReferencedDiagnostic"] = 0] = "FilePreprocessingReferencedDiagnostic";
|
|
4099
4099
|
FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["FilePreprocessingFileExplainingDiagnostic"] = 1] = "FilePreprocessingFileExplainingDiagnostic";
|
|
4100
|
+
FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["ResolutionDiagnostics"] = 2] = "ResolutionDiagnostics";
|
|
4100
4101
|
return FilePreprocessingDiagnosticsKind2;
|
|
4101
4102
|
})(FilePreprocessingDiagnosticsKind || {});
|
|
4102
4103
|
EmitOnly = /* @__PURE__ */ ((EmitOnly4) => {
|
|
@@ -12244,7 +12245,8 @@ ${lanes.join("\n")}
|
|
|
12244
12245
|
return node.end - node.pos;
|
|
12245
12246
|
}
|
|
12246
12247
|
function getResolvedModule(sourceFile, moduleNameText, mode) {
|
|
12247
|
-
|
|
12248
|
+
var _a2, _b;
|
|
12249
|
+
return (_b = (_a2 = sourceFile == null ? void 0 : sourceFile.resolvedModules) == null ? void 0 : _a2.get(moduleNameText, mode)) == null ? void 0 : _b.resolvedModule;
|
|
12248
12250
|
}
|
|
12249
12251
|
function setResolvedModule(sourceFile, moduleNameText, resolvedModule, mode) {
|
|
12250
12252
|
if (!sourceFile.resolvedModules) {
|
|
@@ -12259,14 +12261,14 @@ ${lanes.join("\n")}
|
|
|
12259
12261
|
sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, mode, resolvedTypeReferenceDirective);
|
|
12260
12262
|
}
|
|
12261
12263
|
function getResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, mode) {
|
|
12262
|
-
var _a2;
|
|
12263
|
-
return (_a2 = sourceFile == null ? void 0 : sourceFile.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _a2.get(typeReferenceDirectiveName, mode);
|
|
12264
|
+
var _a2, _b;
|
|
12265
|
+
return (_b = (_a2 = sourceFile == null ? void 0 : sourceFile.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _a2.get(typeReferenceDirectiveName, mode)) == null ? void 0 : _b.resolvedTypeReferenceDirective;
|
|
12264
12266
|
}
|
|
12265
12267
|
function projectReferenceIsEqualTo(oldRef, newRef) {
|
|
12266
12268
|
return oldRef.path === newRef.path && !oldRef.prepend === !newRef.prepend && !oldRef.circular === !newRef.circular;
|
|
12267
12269
|
}
|
|
12268
12270
|
function moduleResolutionIsEqualTo(oldResolution, newResolution) {
|
|
12269
|
-
return oldResolution.isExternalLibraryImport === newResolution.isExternalLibraryImport && oldResolution.extension === newResolution.extension && oldResolution.resolvedFileName === newResolution.resolvedFileName && oldResolution.originalPath === newResolution.originalPath && packageIdIsEqual(oldResolution.packageId, newResolution.packageId);
|
|
12271
|
+
return oldResolution === newResolution || oldResolution.resolvedModule === newResolution.resolvedModule || !!oldResolution.resolvedModule && !!newResolution.resolvedModule && oldResolution.resolvedModule.isExternalLibraryImport === newResolution.resolvedModule.isExternalLibraryImport && oldResolution.resolvedModule.extension === newResolution.resolvedModule.extension && oldResolution.resolvedModule.resolvedFileName === newResolution.resolvedModule.resolvedFileName && oldResolution.resolvedModule.originalPath === newResolution.resolvedModule.originalPath && packageIdIsEqual(oldResolution.resolvedModule.packageId, newResolution.resolvedModule.packageId);
|
|
12270
12272
|
}
|
|
12271
12273
|
function packageIdIsEqual(a, b) {
|
|
12272
12274
|
return a === b || !!a && !!b && a.name === b.name && a.subModuleName === b.subModuleName && a.version === b.version;
|
|
@@ -12278,15 +12280,15 @@ ${lanes.join("\n")}
|
|
|
12278
12280
|
return `${packageIdToPackageName(packageId)}@${packageId.version}`;
|
|
12279
12281
|
}
|
|
12280
12282
|
function typeDirectiveIsEqualTo(oldResolution, newResolution) {
|
|
12281
|
-
return oldResolution.resolvedFileName === newResolution.resolvedFileName && oldResolution.primary === newResolution.primary && oldResolution.originalPath === newResolution.originalPath;
|
|
12283
|
+
return oldResolution === newResolution || oldResolution.resolvedTypeReferenceDirective === newResolution.resolvedTypeReferenceDirective || !!oldResolution.resolvedTypeReferenceDirective && !!newResolution.resolvedTypeReferenceDirective && oldResolution.resolvedTypeReferenceDirective.resolvedFileName === newResolution.resolvedTypeReferenceDirective.resolvedFileName && !!oldResolution.resolvedTypeReferenceDirective.primary === !!newResolution.resolvedTypeReferenceDirective.primary && oldResolution.resolvedTypeReferenceDirective.originalPath === newResolution.resolvedTypeReferenceDirective.originalPath;
|
|
12282
12284
|
}
|
|
12283
|
-
function hasChangesInResolutions(names, newSourceFile, newResolutions, oldResolutions, comparer) {
|
|
12285
|
+
function hasChangesInResolutions(names, newSourceFile, newResolutions, oldResolutions, comparer, nameAndModeGetter) {
|
|
12284
12286
|
Debug.assert(names.length === newResolutions.length);
|
|
12285
12287
|
for (let i = 0; i < names.length; i++) {
|
|
12286
12288
|
const newResolution = newResolutions[i];
|
|
12287
12289
|
const entry = names[i];
|
|
12288
|
-
const name =
|
|
12289
|
-
const mode =
|
|
12290
|
+
const name = nameAndModeGetter.getName(entry);
|
|
12291
|
+
const mode = nameAndModeGetter.getMode(entry, newSourceFile);
|
|
12290
12292
|
const oldResolution = oldResolutions && oldResolutions.get(name, mode);
|
|
12291
12293
|
const changed = oldResolution ? !newResolution || !comparer(oldResolution, newResolution) : newResolution;
|
|
12292
12294
|
if (changed) {
|
|
@@ -16635,13 +16637,14 @@ ${lanes.join("\n")}
|
|
|
16635
16637
|
}
|
|
16636
16638
|
},
|
|
16637
16639
|
setSymlinksFromResolutions(files, typeReferenceDirectives) {
|
|
16638
|
-
var _a2;
|
|
16640
|
+
var _a2, _b;
|
|
16639
16641
|
Debug.assert(!hasProcessedResolutions);
|
|
16640
16642
|
hasProcessedResolutions = true;
|
|
16641
16643
|
for (const file of files) {
|
|
16642
|
-
(_a2 = file.resolvedModules) == null ? void 0 : _a2.forEach((resolution) => processResolution(this, resolution));
|
|
16644
|
+
(_a2 = file.resolvedModules) == null ? void 0 : _a2.forEach((resolution) => processResolution(this, resolution.resolvedModule));
|
|
16645
|
+
(_b = file.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _b.forEach((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective));
|
|
16643
16646
|
}
|
|
16644
|
-
typeReferenceDirectives
|
|
16647
|
+
typeReferenceDirectives.forEach((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective));
|
|
16645
16648
|
},
|
|
16646
16649
|
hasProcessedResolutions: () => hasProcessedResolutions
|
|
16647
16650
|
};
|
|
@@ -34981,17 +34984,29 @@ ${lanes.join("\n")}
|
|
|
34981
34984
|
}
|
|
34982
34985
|
function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache) {
|
|
34983
34986
|
if (resultFromCache) {
|
|
34984
|
-
resultFromCache.failedLookupLocations.
|
|
34985
|
-
resultFromCache.affectingLocations.
|
|
34987
|
+
resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations);
|
|
34988
|
+
resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations);
|
|
34989
|
+
resultFromCache.resolutionDiagnostics = updateResolutionField(resultFromCache.resolutionDiagnostics, diagnostics);
|
|
34986
34990
|
return resultFromCache;
|
|
34987
34991
|
}
|
|
34988
34992
|
return {
|
|
34989
34993
|
resolvedModule: resolved && { resolvedFileName: resolved.path, originalPath: resolved.originalPath === true ? void 0 : resolved.originalPath, extension: resolved.extension, isExternalLibraryImport, packageId: resolved.packageId },
|
|
34990
|
-
failedLookupLocations,
|
|
34991
|
-
affectingLocations,
|
|
34992
|
-
resolutionDiagnostics: diagnostics
|
|
34994
|
+
failedLookupLocations: initializeResolutionField(failedLookupLocations),
|
|
34995
|
+
affectingLocations: initializeResolutionField(affectingLocations),
|
|
34996
|
+
resolutionDiagnostics: initializeResolutionField(diagnostics)
|
|
34993
34997
|
};
|
|
34994
34998
|
}
|
|
34999
|
+
function initializeResolutionField(value) {
|
|
35000
|
+
return value.length ? value : void 0;
|
|
35001
|
+
}
|
|
35002
|
+
function updateResolutionField(to, value) {
|
|
35003
|
+
if (!(value == null ? void 0 : value.length))
|
|
35004
|
+
return to;
|
|
35005
|
+
if (!(to == null ? void 0 : to.length))
|
|
35006
|
+
return value;
|
|
35007
|
+
to.push(...value);
|
|
35008
|
+
return to;
|
|
35009
|
+
}
|
|
34995
35010
|
function readPackageJsonField(jsonContent, fieldName, typeOfTag, state) {
|
|
34996
35011
|
if (!hasProperty(jsonContent, fieldName)) {
|
|
34997
35012
|
if (state.traceEnabled) {
|
|
@@ -35195,7 +35210,12 @@ ${lanes.join("\n")}
|
|
|
35195
35210
|
isExternalLibraryImport: pathContainsNodeModules(fileName)
|
|
35196
35211
|
};
|
|
35197
35212
|
}
|
|
35198
|
-
result = {
|
|
35213
|
+
result = {
|
|
35214
|
+
resolvedTypeReferenceDirective,
|
|
35215
|
+
failedLookupLocations: initializeResolutionField(failedLookupLocations),
|
|
35216
|
+
affectingLocations: initializeResolutionField(affectingLocations),
|
|
35217
|
+
resolutionDiagnostics: initializeResolutionField(diagnostics)
|
|
35218
|
+
};
|
|
35199
35219
|
perFolderCache == null ? void 0 : perFolderCache.set(typeReferenceDirectiveName, resolutionMode, result);
|
|
35200
35220
|
if (traceEnabled)
|
|
35201
35221
|
traceResult(result);
|
|
@@ -35465,18 +35485,12 @@ ${lanes.join("\n")}
|
|
|
35465
35485
|
return result;
|
|
35466
35486
|
}
|
|
35467
35487
|
}
|
|
35468
|
-
function
|
|
35469
|
-
return !isString(entry) ? isStringLiteralLike(entry) ? entry.text : toFileNameLowerCase(entry.fileName) : entry;
|
|
35470
|
-
}
|
|
35471
|
-
function getResolutionMode(entry, file) {
|
|
35472
|
-
return isStringLiteralLike(entry) ? getModeForUsageLocation(file, entry) : entry.resolutionMode || file.impliedNodeFormat;
|
|
35473
|
-
}
|
|
35474
|
-
function zipToModeAwareCache(file, keys, values) {
|
|
35488
|
+
function zipToModeAwareCache(file, keys, values, nameAndModeGetter) {
|
|
35475
35489
|
Debug.assert(keys.length === values.length);
|
|
35476
35490
|
const map2 = createModeAwareCache();
|
|
35477
35491
|
for (let i = 0; i < keys.length; ++i) {
|
|
35478
35492
|
const entry = keys[i];
|
|
35479
|
-
map2.set(
|
|
35493
|
+
map2.set(nameAndModeGetter.getName(entry), nameAndModeGetter.getMode(entry, file), values[i]);
|
|
35480
35494
|
}
|
|
35481
35495
|
return map2;
|
|
35482
35496
|
}
|
|
@@ -35765,7 +35779,7 @@ ${lanes.join("\n")}
|
|
|
35765
35779
|
function resolveJSModule(moduleName, initialDir, host) {
|
|
35766
35780
|
const { resolvedModule, failedLookupLocations } = tryResolveJSModuleWorker(moduleName, initialDir, host);
|
|
35767
35781
|
if (!resolvedModule) {
|
|
35768
|
-
throw new Error(`Could not resolve JS module '${moduleName}' starting at '${initialDir}'. Looked in: ${failedLookupLocations.join(", ")}`);
|
|
35782
|
+
throw new Error(`Could not resolve JS module '${moduleName}' starting at '${initialDir}'. Looked in: ${failedLookupLocations == null ? void 0 : failedLookupLocations.join(", ")}`);
|
|
35769
35783
|
}
|
|
35770
35784
|
return resolvedModule.resolvedFileName;
|
|
35771
35785
|
}
|
|
@@ -40480,9 +40494,9 @@ ${lanes.join("\n")}
|
|
|
40480
40494
|
host.getSourceFiles().forEach((sf) => {
|
|
40481
40495
|
if (!sf.resolvedModules)
|
|
40482
40496
|
return;
|
|
40483
|
-
sf.resolvedModules.forEach((
|
|
40484
|
-
if (
|
|
40485
|
-
map2.set(
|
|
40497
|
+
sf.resolvedModules.forEach(({ resolvedModule }) => {
|
|
40498
|
+
if (resolvedModule == null ? void 0 : resolvedModule.packageId)
|
|
40499
|
+
map2.set(resolvedModule.packageId.name, resolvedModule.extension === ".d.ts" /* Dts */ || !!map2.get(resolvedModule.packageId.name));
|
|
40486
40500
|
});
|
|
40487
40501
|
});
|
|
40488
40502
|
return map2;
|
|
@@ -41286,6 +41300,12 @@ ${lanes.join("\n")}
|
|
|
41286
41300
|
return diagnostic;
|
|
41287
41301
|
}
|
|
41288
41302
|
function isDeprecatedSymbol(symbol) {
|
|
41303
|
+
if (length(symbol.declarations) > 1) {
|
|
41304
|
+
const parentSymbol = getParentOfSymbol(symbol);
|
|
41305
|
+
if (parentSymbol && parentSymbol.flags & 64 /* Interface */) {
|
|
41306
|
+
return some(symbol.declarations, (d) => !!(getCombinedNodeFlags(d) & 268435456 /* Deprecated */));
|
|
41307
|
+
}
|
|
41308
|
+
}
|
|
41289
41309
|
return !!(getDeclarationNodeFlagsFromSymbol(symbol) & 268435456 /* Deprecated */);
|
|
41290
41310
|
}
|
|
41291
41311
|
function addDeprecatedSuggestion(location, declarations, deprecatedEntity) {
|
|
@@ -50979,7 +50999,7 @@ ${lanes.join("\n")}
|
|
|
50979
50999
|
const resolved = resolveAlias(aliasSymbol2);
|
|
50980
51000
|
if (resolved && resolved.flags & 524288 /* TypeAlias */) {
|
|
50981
51001
|
newAliasSymbol = resolved;
|
|
50982
|
-
aliasTypeArguments = typeArgumentsFromTypeReferenceNode(node);
|
|
51002
|
+
aliasTypeArguments = typeArgumentsFromTypeReferenceNode(node) || (typeParameters ? [] : void 0);
|
|
50983
51003
|
}
|
|
50984
51004
|
}
|
|
50985
51005
|
}
|
|
@@ -59795,13 +59815,13 @@ ${lanes.join("\n")}
|
|
|
59795
59815
|
}
|
|
59796
59816
|
const target = getReferenceCandidate(typeOfExpr.expression);
|
|
59797
59817
|
if (!isMatchingReference(reference, target)) {
|
|
59798
|
-
|
|
59818
|
+
if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (literal.text !== "undefined")) {
|
|
59819
|
+
type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
|
|
59820
|
+
}
|
|
59821
|
+
const propertyAccess = getDiscriminantPropertyAccess(target, type);
|
|
59799
59822
|
if (propertyAccess) {
|
|
59800
59823
|
return narrowTypeByDiscriminant(type, propertyAccess, (t) => narrowTypeByLiteralExpression(t, literal, assumeTrue));
|
|
59801
59824
|
}
|
|
59802
|
-
if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (literal.text !== "undefined")) {
|
|
59803
|
-
return getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
|
|
59804
|
-
}
|
|
59805
59825
|
return type;
|
|
59806
59826
|
}
|
|
59807
59827
|
return narrowTypeByLiteralExpression(type, literal, assumeTrue);
|
|
@@ -73412,11 +73432,11 @@ ${lanes.join("\n")}
|
|
|
73412
73432
|
let fileToDirective;
|
|
73413
73433
|
if (resolvedTypeReferenceDirectives) {
|
|
73414
73434
|
fileToDirective = /* @__PURE__ */ new Map();
|
|
73415
|
-
resolvedTypeReferenceDirectives.forEach((
|
|
73416
|
-
if (!
|
|
73435
|
+
resolvedTypeReferenceDirectives.forEach(({ resolvedTypeReferenceDirective }, key, mode) => {
|
|
73436
|
+
if (!(resolvedTypeReferenceDirective == null ? void 0 : resolvedTypeReferenceDirective.resolvedFileName)) {
|
|
73417
73437
|
return;
|
|
73418
73438
|
}
|
|
73419
|
-
const file = host.getSourceFile(
|
|
73439
|
+
const file = host.getSourceFile(resolvedTypeReferenceDirective.resolvedFileName);
|
|
73420
73440
|
if (file) {
|
|
73421
73441
|
addReferencedFilesToTypeDirective(file, key, mode);
|
|
73422
73442
|
}
|
|
@@ -100199,25 +100219,6 @@ ${lanes.join("\n")}
|
|
|
100199
100219
|
}
|
|
100200
100220
|
return result;
|
|
100201
100221
|
}
|
|
100202
|
-
function loadWithTypeDirectiveCache(names, containingFile, redirectedReference, containingFileMode, loader) {
|
|
100203
|
-
if (names.length === 0) {
|
|
100204
|
-
return [];
|
|
100205
|
-
}
|
|
100206
|
-
const resolutions = [];
|
|
100207
|
-
const cache = createModeAwareCache();
|
|
100208
|
-
for (const name of names) {
|
|
100209
|
-
let result;
|
|
100210
|
-
const mode = getModeForFileReference(name, containingFileMode);
|
|
100211
|
-
const strName = getResolutionName(name);
|
|
100212
|
-
if (cache.has(strName, mode)) {
|
|
100213
|
-
result = cache.get(strName, mode);
|
|
100214
|
-
} else {
|
|
100215
|
-
cache.set(strName, mode, result = loader(strName, containingFile, redirectedReference, mode));
|
|
100216
|
-
}
|
|
100217
|
-
resolutions.push(result);
|
|
100218
|
-
}
|
|
100219
|
-
return resolutions;
|
|
100220
|
-
}
|
|
100221
100222
|
function getModeForFileReference(ref, containingFileMode) {
|
|
100222
100223
|
return (isString(ref) ? containingFileMode : ref.resolutionMode) || containingFileMode;
|
|
100223
100224
|
}
|
|
@@ -100283,22 +100284,53 @@ ${lanes.join("\n")}
|
|
|
100283
100284
|
}
|
|
100284
100285
|
return elem.value.text === "import" ? 99 /* ESNext */ : 1 /* CommonJS */;
|
|
100285
100286
|
}
|
|
100286
|
-
function
|
|
100287
|
-
|
|
100288
|
-
|
|
100289
|
-
|
|
100287
|
+
function getModuleResolutionName(literal) {
|
|
100288
|
+
return literal.text;
|
|
100289
|
+
}
|
|
100290
|
+
function createModuleResolutionLoader(containingFile, redirectedReference, options, host, cache) {
|
|
100291
|
+
return {
|
|
100292
|
+
nameAndMode: moduleResolutionNameAndModeGetter,
|
|
100293
|
+
resolve: (moduleName, resoluionMode) => resolveModuleName(
|
|
100294
|
+
moduleName,
|
|
100295
|
+
containingFile,
|
|
100296
|
+
options,
|
|
100297
|
+
host,
|
|
100298
|
+
cache,
|
|
100299
|
+
redirectedReference,
|
|
100300
|
+
resoluionMode
|
|
100301
|
+
)
|
|
100302
|
+
};
|
|
100303
|
+
}
|
|
100304
|
+
function getTypeReferenceResolutionName(entry) {
|
|
100305
|
+
return !isString(entry) ? toFileNameLowerCase(entry.fileName) : entry;
|
|
100306
|
+
}
|
|
100307
|
+
function createTypeReferenceResolutionLoader(containingFile, redirectedReference, options, host, cache) {
|
|
100308
|
+
return {
|
|
100309
|
+
nameAndMode: typeReferenceResolutionNameAndModeGetter,
|
|
100310
|
+
resolve: (typeRef, resoluionMode) => resolveTypeReferenceDirective(
|
|
100311
|
+
typeRef,
|
|
100312
|
+
containingFile,
|
|
100313
|
+
options,
|
|
100314
|
+
host,
|
|
100315
|
+
redirectedReference,
|
|
100316
|
+
cache,
|
|
100317
|
+
resoluionMode
|
|
100318
|
+
)
|
|
100319
|
+
};
|
|
100320
|
+
}
|
|
100321
|
+
function loadWithModeAwareCache(entries, containingFile, redirectedReference, options, containingSourceFile, host, resolutionCache, createLoader) {
|
|
100322
|
+
if (entries.length === 0)
|
|
100323
|
+
return emptyArray;
|
|
100290
100324
|
const resolutions = [];
|
|
100291
|
-
const cache =
|
|
100292
|
-
|
|
100293
|
-
for (const entry of
|
|
100294
|
-
|
|
100295
|
-
const mode =
|
|
100296
|
-
|
|
100297
|
-
|
|
100298
|
-
if (
|
|
100299
|
-
result =
|
|
100300
|
-
} else {
|
|
100301
|
-
cache.set(name, mode, result = loader(name, mode, containingFileName, redirectedReference));
|
|
100325
|
+
const cache = /* @__PURE__ */ new Map();
|
|
100326
|
+
const loader = createLoader(containingFile, redirectedReference, options, host, resolutionCache);
|
|
100327
|
+
for (const entry of entries) {
|
|
100328
|
+
const name = loader.nameAndMode.getName(entry);
|
|
100329
|
+
const mode = loader.nameAndMode.getMode(entry, containingSourceFile);
|
|
100330
|
+
const key = createModeAwareCacheKey(name, mode);
|
|
100331
|
+
let result = cache.get(key);
|
|
100332
|
+
if (!result) {
|
|
100333
|
+
cache.set(key, result = loader.resolve(name, mode));
|
|
100302
100334
|
}
|
|
100303
100335
|
resolutions.push(result);
|
|
100304
100336
|
}
|
|
@@ -100343,14 +100375,14 @@ ${lanes.join("\n")}
|
|
|
100343
100375
|
return location.pos !== void 0;
|
|
100344
100376
|
}
|
|
100345
100377
|
function getReferencedFileLocation(getSourceFileByPath, ref) {
|
|
100346
|
-
var _a2, _b, _c, _d;
|
|
100378
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
100347
100379
|
const file = Debug.checkDefined(getSourceFileByPath(ref.file));
|
|
100348
100380
|
const { kind, index } = ref;
|
|
100349
100381
|
let pos, end, packageId, resolutionMode;
|
|
100350
100382
|
switch (kind) {
|
|
100351
100383
|
case 3 /* Import */:
|
|
100352
100384
|
const importLiteral = getModuleNameStringLiteralAt(file, index);
|
|
100353
|
-
packageId = (_b = (_a2 = file.resolvedModules) == null ? void 0 : _a2.get(importLiteral.text, getModeForResolutionAtIndex(file, index))) == null ? void 0 : _b.packageId;
|
|
100385
|
+
packageId = (_c = (_b = (_a2 = file.resolvedModules) == null ? void 0 : _a2.get(importLiteral.text, getModeForResolutionAtIndex(file, index))) == null ? void 0 : _b.resolvedModule) == null ? void 0 : _c.packageId;
|
|
100354
100386
|
if (importLiteral.pos === -1)
|
|
100355
100387
|
return { file, packageId, text: importLiteral.text };
|
|
100356
100388
|
pos = skipTrivia(file.text, importLiteral.pos);
|
|
@@ -100361,7 +100393,7 @@ ${lanes.join("\n")}
|
|
|
100361
100393
|
break;
|
|
100362
100394
|
case 5 /* TypeReferenceDirective */:
|
|
100363
100395
|
({ pos, end, resolutionMode } = file.typeReferenceDirectives[index]);
|
|
100364
|
-
packageId = (
|
|
100396
|
+
packageId = (_f = (_e = (_d = file.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _d.get(toFileNameLowerCase(file.typeReferenceDirectives[index].fileName), resolutionMode || file.impliedNodeFormat)) == null ? void 0 : _e.resolvedTypeReferenceDirective) == null ? void 0 : _f.packageId;
|
|
100365
100397
|
break;
|
|
100366
100398
|
case 7 /* LibReferenceDirective */:
|
|
100367
100399
|
({ pos, end } = file.libReferenceDirectives[index]);
|
|
@@ -100457,7 +100489,7 @@ ${lanes.join("\n")}
|
|
|
100457
100489
|
};
|
|
100458
100490
|
}
|
|
100459
100491
|
function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) {
|
|
100460
|
-
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
100492
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
100461
100493
|
const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions;
|
|
100462
100494
|
const { rootNames, options, configFileParsingDiagnostics, projectReferences } = createProgramOptions;
|
|
100463
100495
|
let { oldProgram } = createProgramOptions;
|
|
@@ -100474,6 +100506,8 @@ ${lanes.join("\n")}
|
|
|
100474
100506
|
const cachedDeclarationDiagnosticsForFile = {};
|
|
100475
100507
|
let resolvedTypeReferenceDirectives = createModeAwareCache();
|
|
100476
100508
|
let fileProcessingDiagnostics;
|
|
100509
|
+
let automaticTypeDirectiveNames;
|
|
100510
|
+
let automaticTypeDirectiveResolutions;
|
|
100477
100511
|
const maxNodeModuleJsDepth = typeof options.maxNodeModuleJsDepth === "number" ? options.maxNodeModuleJsDepth : 0;
|
|
100478
100512
|
let currentNodeModulesDepth = 0;
|
|
100479
100513
|
const modulesWithElidedImports = /* @__PURE__ */ new Map();
|
|
@@ -100492,50 +100526,59 @@ ${lanes.join("\n")}
|
|
|
100492
100526
|
const hasEmitBlockingDiagnostics = /* @__PURE__ */ new Map();
|
|
100493
100527
|
let _compilerOptionsObjectLiteralSyntax;
|
|
100494
100528
|
let moduleResolutionCache;
|
|
100495
|
-
let typeReferenceDirectiveResolutionCache;
|
|
100496
100529
|
let actualResolveModuleNamesWorker;
|
|
100497
100530
|
const hasInvalidatedResolutions = host.hasInvalidatedResolutions || returnFalse;
|
|
100498
|
-
if (host.
|
|
100499
|
-
actualResolveModuleNamesWorker = (
|
|
100500
|
-
var _a3;
|
|
100501
|
-
return host.resolveModuleNames(
|
|
100502
|
-
moduleNames.map((literal) => literal.text),
|
|
100503
|
-
containingFileName,
|
|
100504
|
-
(_a3 = resolutionInfo == null ? void 0 : resolutionInfo.reusedNames) == null ? void 0 : _a3.map((literal) => literal.text),
|
|
100505
|
-
redirectedReference,
|
|
100506
|
-
options,
|
|
100507
|
-
containingFile,
|
|
100508
|
-
resolutionInfo
|
|
100509
|
-
).map((resolved) => {
|
|
100510
|
-
if (!resolved || resolved.extension !== void 0) {
|
|
100511
|
-
return resolved;
|
|
100512
|
-
}
|
|
100513
|
-
const withExtension = clone(resolved);
|
|
100514
|
-
withExtension.extension = extensionFromPath(resolved.resolvedFileName);
|
|
100515
|
-
return withExtension;
|
|
100516
|
-
});
|
|
100517
|
-
};
|
|
100531
|
+
if (host.resolveModuleNameLiterals) {
|
|
100532
|
+
actualResolveModuleNamesWorker = host.resolveModuleNameLiterals.bind(host);
|
|
100518
100533
|
moduleResolutionCache = (_b = host.getModuleResolutionCache) == null ? void 0 : _b.call(host);
|
|
100534
|
+
} else if (host.resolveModuleNames) {
|
|
100535
|
+
actualResolveModuleNamesWorker = (moduleNames, containingFile, redirectedReference, options2, containingSourceFile, reusedNames) => host.resolveModuleNames(
|
|
100536
|
+
moduleNames.map(getModuleResolutionName),
|
|
100537
|
+
containingFile,
|
|
100538
|
+
reusedNames == null ? void 0 : reusedNames.map(getModuleResolutionName),
|
|
100539
|
+
redirectedReference,
|
|
100540
|
+
options2,
|
|
100541
|
+
containingSourceFile
|
|
100542
|
+
).map(
|
|
100543
|
+
(resolved) => resolved ? resolved.extension !== void 0 ? { resolvedModule: resolved } : { resolvedModule: { ...resolved, extension: extensionFromPath(resolved.resolvedFileName) } } : emptyResolution
|
|
100544
|
+
);
|
|
100545
|
+
moduleResolutionCache = (_c = host.getModuleResolutionCache) == null ? void 0 : _c.call(host);
|
|
100519
100546
|
} else {
|
|
100520
100547
|
moduleResolutionCache = createModuleResolutionCache(currentDirectory, getCanonicalFileName, options);
|
|
100521
|
-
|
|
100522
|
-
|
|
100548
|
+
actualResolveModuleNamesWorker = (moduleNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache(
|
|
100549
|
+
moduleNames,
|
|
100550
|
+
containingFile,
|
|
100551
|
+
redirectedReference,
|
|
100552
|
+
options2,
|
|
100553
|
+
containingSourceFile,
|
|
100554
|
+
host,
|
|
100555
|
+
moduleResolutionCache,
|
|
100556
|
+
createModuleResolutionLoader
|
|
100557
|
+
);
|
|
100523
100558
|
}
|
|
100524
100559
|
let actualResolveTypeReferenceDirectiveNamesWorker;
|
|
100525
|
-
if (host.
|
|
100526
|
-
actualResolveTypeReferenceDirectiveNamesWorker =
|
|
100560
|
+
if (host.resolveTypeReferenceDirectiveReferences) {
|
|
100561
|
+
actualResolveTypeReferenceDirectiveNamesWorker = host.resolveTypeReferenceDirectiveReferences.bind(host);
|
|
100562
|
+
} else if (host.resolveTypeReferenceDirectives) {
|
|
100563
|
+
actualResolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => host.resolveTypeReferenceDirectives(
|
|
100564
|
+
typeDirectiveNames.map(getTypeReferenceResolutionName),
|
|
100565
|
+
containingFile,
|
|
100566
|
+
redirectedReference,
|
|
100567
|
+
options2,
|
|
100568
|
+
containingSourceFile == null ? void 0 : containingSourceFile.impliedNodeFormat
|
|
100569
|
+
).map((resolvedTypeReferenceDirective) => ({ resolvedTypeReferenceDirective }));
|
|
100527
100570
|
} else {
|
|
100528
|
-
typeReferenceDirectiveResolutionCache = createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, void 0, moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache());
|
|
100529
|
-
|
|
100530
|
-
|
|
100571
|
+
const typeReferenceDirectiveResolutionCache = createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, void 0, moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache());
|
|
100572
|
+
actualResolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache(
|
|
100573
|
+
typeDirectiveNames,
|
|
100531
100574
|
containingFile,
|
|
100532
|
-
options,
|
|
100533
|
-
host,
|
|
100534
100575
|
redirectedReference,
|
|
100576
|
+
options2,
|
|
100577
|
+
containingSourceFile,
|
|
100578
|
+
host,
|
|
100535
100579
|
typeReferenceDirectiveResolutionCache,
|
|
100536
|
-
|
|
100537
|
-
)
|
|
100538
|
-
actualResolveTypeReferenceDirectiveNamesWorker = (typeReferenceDirectiveNames, containingFile, redirectedReference, containingFileMode) => loadWithTypeDirectiveCache(Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, containingFileMode, loader);
|
|
100580
|
+
createTypeReferenceResolutionLoader
|
|
100581
|
+
);
|
|
100539
100582
|
}
|
|
100540
100583
|
const packageIdToSourceFile = /* @__PURE__ */ new Map();
|
|
100541
100584
|
let sourceFileToPackageName = /* @__PURE__ */ new Map();
|
|
@@ -100548,7 +100591,7 @@ ${lanes.join("\n")}
|
|
|
100548
100591
|
let projectReferenceRedirects;
|
|
100549
100592
|
let mapFromFileToProjectReferenceRedirects;
|
|
100550
100593
|
let mapFromToProjectReferenceRedirectSource;
|
|
100551
|
-
const useSourceOfProjectReferenceRedirect = !!((
|
|
100594
|
+
const useSourceOfProjectReferenceRedirect = !!((_d = host.useSourceOfProjectReferenceRedirect) == null ? void 0 : _d.call(host)) && !options.disableSourceOfProjectReferenceRedirect;
|
|
100552
100595
|
const { onProgramCreateComplete, fileExists, directoryExists } = updateHostForUseSourceOfProjectReferenceRedirect({
|
|
100553
100596
|
compilerHost: host,
|
|
100554
100597
|
getSymlinkCache,
|
|
@@ -100559,13 +100602,13 @@ ${lanes.join("\n")}
|
|
|
100559
100602
|
forEachResolvedProjectReference: forEachResolvedProjectReference2
|
|
100560
100603
|
});
|
|
100561
100604
|
const readFile = host.readFile.bind(host);
|
|
100562
|
-
(
|
|
100605
|
+
(_e = tracing) == null ? void 0 : _e.push(tracing.Phase.Program, "shouldProgramCreateNewSourceFiles", { hasOldProgram: !!oldProgram });
|
|
100563
100606
|
const shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options);
|
|
100564
|
-
(
|
|
100607
|
+
(_f = tracing) == null ? void 0 : _f.pop();
|
|
100565
100608
|
let structureIsReused;
|
|
100566
|
-
(
|
|
100609
|
+
(_g = tracing) == null ? void 0 : _g.push(tracing.Phase.Program, "tryReuseStructureFromOldProgram", {});
|
|
100567
100610
|
structureIsReused = tryReuseStructureFromOldProgram();
|
|
100568
|
-
(
|
|
100611
|
+
(_h = tracing) == null ? void 0 : _h.pop();
|
|
100569
100612
|
if (structureIsReused !== 2 /* Completely */) {
|
|
100570
100613
|
processingDefaultLibFiles = [];
|
|
100571
100614
|
processingOtherFiles = [];
|
|
@@ -100599,19 +100642,30 @@ ${lanes.join("\n")}
|
|
|
100599
100642
|
});
|
|
100600
100643
|
}
|
|
100601
100644
|
}
|
|
100602
|
-
(
|
|
100645
|
+
(_i = tracing) == null ? void 0 : _i.push(tracing.Phase.Program, "processRootFiles", { count: rootNames.length });
|
|
100603
100646
|
forEach(rootNames, (name, index) => processRootFile(name, false, false, { kind: 0 /* RootFile */, index }));
|
|
100604
|
-
(
|
|
100605
|
-
|
|
100606
|
-
|
|
100607
|
-
|
|
100647
|
+
(_j = tracing) == null ? void 0 : _j.pop();
|
|
100648
|
+
automaticTypeDirectiveNames != null ? automaticTypeDirectiveNames : automaticTypeDirectiveNames = rootNames.length ? getAutomaticTypeDirectiveNames(options, host) : emptyArray;
|
|
100649
|
+
automaticTypeDirectiveResolutions = createModeAwareCache();
|
|
100650
|
+
if (automaticTypeDirectiveNames.length) {
|
|
100651
|
+
(_k = tracing) == null ? void 0 : _k.push(tracing.Phase.Program, "processTypeReferences", { count: automaticTypeDirectiveNames.length });
|
|
100608
100652
|
const containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : host.getCurrentDirectory();
|
|
100609
100653
|
const containingFilename = combinePaths(containingDirectory, inferredTypesContainingFile);
|
|
100610
|
-
const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(
|
|
100611
|
-
for (let i = 0; i <
|
|
100612
|
-
|
|
100654
|
+
const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(automaticTypeDirectiveNames, containingFilename);
|
|
100655
|
+
for (let i = 0; i < automaticTypeDirectiveNames.length; i++) {
|
|
100656
|
+
automaticTypeDirectiveResolutions.set(automaticTypeDirectiveNames[i], void 0, resolutions[i]);
|
|
100657
|
+
processTypeReferenceDirective(
|
|
100658
|
+
automaticTypeDirectiveNames[i],
|
|
100659
|
+
void 0,
|
|
100660
|
+
resolutions[i],
|
|
100661
|
+
{
|
|
100662
|
+
kind: 8 /* AutomaticTypeDirectiveFile */,
|
|
100663
|
+
typeReference: automaticTypeDirectiveNames[i],
|
|
100664
|
+
packageId: (_m = (_l = resolutions[i]) == null ? void 0 : _l.resolvedTypeReferenceDirective) == null ? void 0 : _m.packageId
|
|
100665
|
+
}
|
|
100666
|
+
);
|
|
100613
100667
|
}
|
|
100614
|
-
(
|
|
100668
|
+
(_n = tracing) == null ? void 0 : _n.pop();
|
|
100615
100669
|
}
|
|
100616
100670
|
if (rootNames.length && !skipDefaultLib) {
|
|
100617
100671
|
const defaultLibraryFileName = getDefaultLibraryFileName();
|
|
@@ -100658,7 +100712,6 @@ ${lanes.join("\n")}
|
|
|
100658
100712
|
}
|
|
100659
100713
|
);
|
|
100660
100714
|
}
|
|
100661
|
-
typeReferenceDirectiveResolutionCache = void 0;
|
|
100662
100715
|
oldProgram = void 0;
|
|
100663
100716
|
const program = {
|
|
100664
100717
|
getRootFileNames: () => rootNames,
|
|
@@ -100691,6 +100744,8 @@ ${lanes.join("\n")}
|
|
|
100691
100744
|
getRelationCacheSizes: () => getTypeChecker().getRelationCacheSizes(),
|
|
100692
100745
|
getFileProcessingDiagnostics: () => fileProcessingDiagnostics,
|
|
100693
100746
|
getResolvedTypeReferenceDirectives: () => resolvedTypeReferenceDirectives,
|
|
100747
|
+
getAutomaticTypeDirectiveNames: () => automaticTypeDirectiveNames,
|
|
100748
|
+
getAutomaticTypeDirectiveResolutions: () => automaticTypeDirectiveResolutions,
|
|
100694
100749
|
isSourceFileFromExternalLibrary,
|
|
100695
100750
|
isSourceFileDefaultLibrary,
|
|
100696
100751
|
getSourceFileFromReference,
|
|
@@ -100700,7 +100755,6 @@ ${lanes.join("\n")}
|
|
|
100700
100755
|
usesUriStyleNodeCoreModules,
|
|
100701
100756
|
isEmittedFile,
|
|
100702
100757
|
getConfigFileParsingDiagnostics: getConfigFileParsingDiagnostics2,
|
|
100703
|
-
getResolvedModuleWithFailedLookupLocationsFromCache,
|
|
100704
100758
|
getProjectReferences,
|
|
100705
100759
|
getResolvedProjectReferences,
|
|
100706
100760
|
getProjectReferenceRedirect,
|
|
@@ -100713,7 +100767,7 @@ ${lanes.join("\n")}
|
|
|
100713
100767
|
readFile,
|
|
100714
100768
|
directoryExists,
|
|
100715
100769
|
getSymlinkCache,
|
|
100716
|
-
realpath: (
|
|
100770
|
+
realpath: (_o = host.realpath) == null ? void 0 : _o.bind(host),
|
|
100717
100771
|
useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),
|
|
100718
100772
|
getFileIncludeReasons: () => fileReasons,
|
|
100719
100773
|
structureIsReused,
|
|
@@ -100727,6 +100781,8 @@ ${lanes.join("\n")}
|
|
|
100727
100781
|
case 0 /* FilePreprocessingReferencedDiagnostic */:
|
|
100728
100782
|
const { file, pos, end } = getReferencedFileLocation(getSourceFileByPath, diagnostic.reason);
|
|
100729
100783
|
return programDiagnostics.add(createFileDiagnostic(file, Debug.checkDefined(pos), Debug.checkDefined(end) - pos, diagnostic.diagnostic, ...diagnostic.args || emptyArray));
|
|
100784
|
+
case 2 /* ResolutionDiagnostics */:
|
|
100785
|
+
return diagnostic.diagnostics.forEach((d) => programDiagnostics.add(d));
|
|
100730
100786
|
default:
|
|
100731
100787
|
Debug.assertNever(diagnostic);
|
|
100732
100788
|
}
|
|
@@ -100734,32 +100790,30 @@ ${lanes.join("\n")}
|
|
|
100734
100790
|
verifyCompilerOptions();
|
|
100735
100791
|
mark("afterProgram");
|
|
100736
100792
|
measure("Program", "beforeProgram", "afterProgram");
|
|
100737
|
-
(
|
|
100793
|
+
(_p = tracing) == null ? void 0 : _p.pop();
|
|
100738
100794
|
return program;
|
|
100739
|
-
function addResolutionDiagnostics(
|
|
100740
|
-
|
|
100795
|
+
function addResolutionDiagnostics(resolution) {
|
|
100796
|
+
var _a3;
|
|
100797
|
+
if (!((_a3 = resolution.resolutionDiagnostics) == null ? void 0 : _a3.length))
|
|
100741
100798
|
return;
|
|
100742
|
-
|
|
100743
|
-
|
|
100744
|
-
|
|
100799
|
+
(fileProcessingDiagnostics != null ? fileProcessingDiagnostics : fileProcessingDiagnostics = []).push({
|
|
100800
|
+
kind: 2 /* ResolutionDiagnostics */,
|
|
100801
|
+
diagnostics: resolution.resolutionDiagnostics
|
|
100802
|
+
});
|
|
100745
100803
|
}
|
|
100746
|
-
function
|
|
100747
|
-
|
|
100748
|
-
|
|
100804
|
+
function addResolutionDiagnosticsFromResolutionOrCache(containingFile, name, resolution, mode) {
|
|
100805
|
+
if (host.resolveModuleNameLiterals || !host.resolveModuleNames)
|
|
100806
|
+
return addResolutionDiagnostics(resolution);
|
|
100807
|
+
if (!moduleResolutionCache || isExternalModuleNameRelative(name))
|
|
100749
100808
|
return;
|
|
100750
100809
|
const containingFileName = getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory);
|
|
100751
100810
|
const containingDir = getDirectoryPath(containingFileName);
|
|
100752
100811
|
const redirectedReference = getRedirectReferenceForResolution(containingFile);
|
|
100753
|
-
|
|
100754
|
-
|
|
100755
|
-
|
|
100756
|
-
if (isExternalModuleNameRelative(name))
|
|
100757
|
-
continue;
|
|
100758
|
-
const diags = (_a3 = moduleResolutionCache.getOrCreateCacheForModuleName(name, mode, redirectedReference).get(containingDir)) == null ? void 0 : _a3.resolutionDiagnostics;
|
|
100759
|
-
addResolutionDiagnostics(diags);
|
|
100760
|
-
}
|
|
100812
|
+
const fromCache = moduleResolutionCache.getOrCreateCacheForModuleName(name, mode, redirectedReference).get(containingDir);
|
|
100813
|
+
if (fromCache)
|
|
100814
|
+
addResolutionDiagnostics(fromCache);
|
|
100761
100815
|
}
|
|
100762
|
-
function resolveModuleNamesWorker(moduleNames, containingFile,
|
|
100816
|
+
function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames) {
|
|
100763
100817
|
var _a3, _b2;
|
|
100764
100818
|
if (!moduleNames.length)
|
|
100765
100819
|
return emptyArray;
|
|
@@ -100767,23 +100821,22 @@ ${lanes.join("\n")}
|
|
|
100767
100821
|
const redirectedReference = getRedirectReferenceForResolution(containingFile);
|
|
100768
100822
|
(_a3 = tracing) == null ? void 0 : _a3.push(tracing.Phase.Program, "resolveModuleNamesWorker", { containingFileName });
|
|
100769
100823
|
mark("beforeResolveModule");
|
|
100770
|
-
const result = actualResolveModuleNamesWorker(moduleNames,
|
|
100824
|
+
const result = actualResolveModuleNamesWorker(moduleNames, containingFileName, redirectedReference, options, containingFile, reusedNames);
|
|
100771
100825
|
mark("afterResolveModule");
|
|
100772
100826
|
measure("ResolveModule", "beforeResolveModule", "afterResolveModule");
|
|
100773
100827
|
(_b2 = tracing) == null ? void 0 : _b2.pop();
|
|
100774
|
-
pullDiagnosticsFromCache(moduleNames, containingFile);
|
|
100775
100828
|
return result;
|
|
100776
100829
|
}
|
|
100777
|
-
function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile,
|
|
100830
|
+
function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, reusedNames) {
|
|
100778
100831
|
var _a3, _b2;
|
|
100779
100832
|
if (!typeDirectiveNames.length)
|
|
100780
100833
|
return [];
|
|
100834
|
+
const containingSourceFile = !isString(containingFile) ? containingFile : void 0;
|
|
100781
100835
|
const containingFileName = !isString(containingFile) ? getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory) : containingFile;
|
|
100782
|
-
const redirectedReference =
|
|
100783
|
-
const containingFileMode = !isString(containingFile) ? containingFile.impliedNodeFormat : void 0;
|
|
100836
|
+
const redirectedReference = containingSourceFile && getRedirectReferenceForResolution(containingSourceFile);
|
|
100784
100837
|
(_a3 = tracing) == null ? void 0 : _a3.push(tracing.Phase.Program, "resolveTypeReferenceDirectiveNamesWorker", { containingFileName });
|
|
100785
100838
|
mark("beforeResolveTypeReference");
|
|
100786
|
-
const result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFileName, redirectedReference,
|
|
100839
|
+
const result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFileName, redirectedReference, options, containingSourceFile, reusedNames);
|
|
100787
100840
|
mark("afterResolveTypeReference");
|
|
100788
100841
|
measure("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference");
|
|
100789
100842
|
(_b2 = tracing) == null ? void 0 : _b2.pop();
|
|
@@ -100829,9 +100882,6 @@ ${lanes.join("\n")}
|
|
|
100829
100882
|
}
|
|
100830
100883
|
return libs.length + 2;
|
|
100831
100884
|
}
|
|
100832
|
-
function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName, containingFile, mode) {
|
|
100833
|
-
return moduleResolutionCache && resolveModuleNameFromCache(moduleName, containingFile, moduleResolutionCache, mode);
|
|
100834
|
-
}
|
|
100835
100885
|
function toPath3(fileName) {
|
|
100836
100886
|
return toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
100837
100887
|
}
|
|
@@ -100860,6 +100910,7 @@ ${lanes.join("\n")}
|
|
|
100860
100910
|
return classifiableNames;
|
|
100861
100911
|
}
|
|
100862
100912
|
function resolveModuleNamesReusingOldState(moduleNames, file) {
|
|
100913
|
+
var _a3;
|
|
100863
100914
|
if (structureIsReused === 0 /* Not */ && !file.ambientModuleNames.length) {
|
|
100864
100915
|
return resolveModuleNamesWorker(moduleNames, file, void 0);
|
|
100865
100916
|
}
|
|
@@ -100875,24 +100926,24 @@ ${lanes.join("\n")}
|
|
|
100875
100926
|
let unknownModuleNames;
|
|
100876
100927
|
let result;
|
|
100877
100928
|
let reusedNames;
|
|
100878
|
-
const predictedToResolveToAmbientModuleMarker =
|
|
100929
|
+
const predictedToResolveToAmbientModuleMarker = emptyResolution;
|
|
100879
100930
|
for (let i = 0; i < moduleNames.length; i++) {
|
|
100880
100931
|
const moduleName = moduleNames[i];
|
|
100881
100932
|
if (file === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path)) {
|
|
100882
100933
|
const mode = getModeForUsageLocation(file, moduleName);
|
|
100883
|
-
const
|
|
100884
|
-
if (
|
|
100934
|
+
const oldResolution = (_a3 = oldSourceFile.resolvedModules) == null ? void 0 : _a3.get(moduleName.text, mode);
|
|
100935
|
+
if (oldResolution == null ? void 0 : oldResolution.resolvedModule) {
|
|
100885
100936
|
if (isTraceEnabled(options, host)) {
|
|
100886
100937
|
trace(
|
|
100887
100938
|
host,
|
|
100888
|
-
|
|
100939
|
+
oldResolution.resolvedModule.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2,
|
|
100889
100940
|
moduleName.text,
|
|
100890
100941
|
getNormalizedAbsolutePath(file.originalFileName, currentDirectory),
|
|
100891
|
-
|
|
100892
|
-
|
|
100942
|
+
oldResolution.resolvedModule.resolvedFileName,
|
|
100943
|
+
oldResolution.resolvedModule.packageId && packageIdToString(oldResolution.resolvedModule.packageId)
|
|
100893
100944
|
);
|
|
100894
100945
|
}
|
|
100895
|
-
(result != null ? result : result = new Array(moduleNames.length))[i] =
|
|
100946
|
+
(result != null ? result : result = new Array(moduleNames.length))[i] = oldResolution;
|
|
100896
100947
|
(reusedNames != null ? reusedNames : reusedNames = []).push(moduleName);
|
|
100897
100948
|
continue;
|
|
100898
100949
|
}
|
|
@@ -100912,18 +100963,14 @@ ${lanes.join("\n")}
|
|
|
100912
100963
|
(unknownModuleNames != null ? unknownModuleNames : unknownModuleNames = []).push(moduleName);
|
|
100913
100964
|
}
|
|
100914
100965
|
}
|
|
100915
|
-
const resolutions = unknownModuleNames && unknownModuleNames.length ? resolveModuleNamesWorker(unknownModuleNames, file,
|
|
100966
|
+
const resolutions = unknownModuleNames && unknownModuleNames.length ? resolveModuleNamesWorker(unknownModuleNames, file, reusedNames) : emptyArray;
|
|
100916
100967
|
if (!result) {
|
|
100917
100968
|
Debug.assert(resolutions.length === moduleNames.length);
|
|
100918
100969
|
return resolutions;
|
|
100919
100970
|
}
|
|
100920
100971
|
let j = 0;
|
|
100921
100972
|
for (let i = 0; i < result.length; i++) {
|
|
100922
|
-
if (result[i]) {
|
|
100923
|
-
if (result[i] === predictedToResolveToAmbientModuleMarker) {
|
|
100924
|
-
result[i] = void 0;
|
|
100925
|
-
}
|
|
100926
|
-
} else {
|
|
100973
|
+
if (!result[i]) {
|
|
100927
100974
|
result[i] = resolutions[j];
|
|
100928
100975
|
j++;
|
|
100929
100976
|
}
|
|
@@ -100947,6 +100994,7 @@ ${lanes.join("\n")}
|
|
|
100947
100994
|
}
|
|
100948
100995
|
}
|
|
100949
100996
|
function resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectiveNames, containingFile) {
|
|
100997
|
+
var _a3;
|
|
100950
100998
|
if (structureIsReused === 0 /* Not */) {
|
|
100951
100999
|
return resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, void 0);
|
|
100952
101000
|
}
|
|
@@ -100955,7 +101003,7 @@ ${lanes.join("\n")}
|
|
|
100955
101003
|
if (oldSourceFile !== containingFile && containingFile.resolvedTypeReferenceDirectiveNames) {
|
|
100956
101004
|
const result2 = [];
|
|
100957
101005
|
for (const typeDirectiveName of typeDirectiveNames) {
|
|
100958
|
-
const resolvedTypeReferenceDirective = containingFile.resolvedTypeReferenceDirectiveNames.get(
|
|
101006
|
+
const resolvedTypeReferenceDirective = containingFile.resolvedTypeReferenceDirectiveNames.get(getTypeReferenceResolutionName(typeDirectiveName), getModeForFileReference(typeDirectiveName, containingFile.impliedNodeFormat));
|
|
100959
101007
|
result2.push(resolvedTypeReferenceDirective);
|
|
100960
101008
|
}
|
|
100961
101009
|
return result2;
|
|
@@ -100969,21 +101017,21 @@ ${lanes.join("\n")}
|
|
|
100969
101017
|
for (let i = 0; i < typeDirectiveNames.length; i++) {
|
|
100970
101018
|
const entry = typeDirectiveNames[i];
|
|
100971
101019
|
if (canReuseResolutions) {
|
|
100972
|
-
const typeDirectiveName =
|
|
101020
|
+
const typeDirectiveName = getTypeReferenceResolutionName(entry);
|
|
100973
101021
|
const mode = getModeForFileReference(entry, containingSourceFile == null ? void 0 : containingSourceFile.impliedNodeFormat);
|
|
100974
|
-
const
|
|
100975
|
-
if (
|
|
101022
|
+
const oldResolution = (_a3 = !isString(containingFile) ? oldSourceFile == null ? void 0 : oldSourceFile.resolvedTypeReferenceDirectiveNames : oldProgram == null ? void 0 : oldProgram.getAutomaticTypeDirectiveResolutions()) == null ? void 0 : _a3.get(typeDirectiveName, mode);
|
|
101023
|
+
if (oldResolution == null ? void 0 : oldResolution.resolvedTypeReferenceDirective) {
|
|
100976
101024
|
if (isTraceEnabled(options, host)) {
|
|
100977
101025
|
trace(
|
|
100978
101026
|
host,
|
|
100979
|
-
|
|
101027
|
+
oldResolution.resolvedTypeReferenceDirective.packageId ? Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2,
|
|
100980
101028
|
typeDirectiveName,
|
|
100981
101029
|
!isString(containingFile) ? getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory) : containingFile,
|
|
100982
|
-
|
|
100983
|
-
|
|
101030
|
+
oldResolution.resolvedTypeReferenceDirective.resolvedFileName,
|
|
101031
|
+
oldResolution.resolvedTypeReferenceDirective.packageId && packageIdToString(oldResolution.resolvedTypeReferenceDirective.packageId)
|
|
100984
101032
|
);
|
|
100985
101033
|
}
|
|
100986
|
-
(result != null ? result : result = new Array(typeDirectiveNames.length))[i] =
|
|
101034
|
+
(result != null ? result : result = new Array(typeDirectiveNames.length))[i] = oldResolution;
|
|
100987
101035
|
(reusedNames != null ? reusedNames : reusedNames = []).push(entry);
|
|
100988
101036
|
continue;
|
|
100989
101037
|
}
|
|
@@ -100995,7 +101043,7 @@ ${lanes.join("\n")}
|
|
|
100995
101043
|
const resolutions = resolveTypeReferenceDirectiveNamesWorker(
|
|
100996
101044
|
unknownTypeReferenceDirectiveNames,
|
|
100997
101045
|
containingFile,
|
|
100998
|
-
|
|
101046
|
+
reusedNames
|
|
100999
101047
|
);
|
|
101000
101048
|
if (!result) {
|
|
101001
101049
|
Debug.assert(resolutions.length === typeDirectiveNames.length);
|
|
@@ -101031,7 +101079,7 @@ ${lanes.join("\n")}
|
|
|
101031
101079
|
);
|
|
101032
101080
|
}
|
|
101033
101081
|
function tryReuseStructureFromOldProgram() {
|
|
101034
|
-
var _a3
|
|
101082
|
+
var _a3;
|
|
101035
101083
|
if (!oldProgram) {
|
|
101036
101084
|
return 0 /* Not */;
|
|
101037
101085
|
}
|
|
@@ -101141,19 +101189,19 @@ ${lanes.join("\n")}
|
|
|
101141
101189
|
for (const { oldFile: oldSourceFile, newFile: newSourceFile } of modifiedSourceFiles) {
|
|
101142
101190
|
const moduleNames = getModuleNames(newSourceFile);
|
|
101143
101191
|
const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFile);
|
|
101144
|
-
const resolutionsChanged = hasChangesInResolutions(moduleNames, newSourceFile, resolutions, oldSourceFile.resolvedModules, moduleResolutionIsEqualTo);
|
|
101192
|
+
const resolutionsChanged = hasChangesInResolutions(moduleNames, newSourceFile, resolutions, oldSourceFile.resolvedModules, moduleResolutionIsEqualTo, moduleResolutionNameAndModeGetter);
|
|
101145
101193
|
if (resolutionsChanged) {
|
|
101146
101194
|
structureIsReused = 1 /* SafeModules */;
|
|
101147
|
-
newSourceFile.resolvedModules = zipToModeAwareCache(newSourceFile, moduleNames, resolutions);
|
|
101195
|
+
newSourceFile.resolvedModules = zipToModeAwareCache(newSourceFile, moduleNames, resolutions, moduleResolutionNameAndModeGetter);
|
|
101148
101196
|
} else {
|
|
101149
101197
|
newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
|
|
101150
101198
|
}
|
|
101151
101199
|
const typesReferenceDirectives = newSourceFile.typeReferenceDirectives;
|
|
101152
101200
|
const typeReferenceResolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typesReferenceDirectives, newSourceFile);
|
|
101153
|
-
const typeReferenceResolutionsChanged = hasChangesInResolutions(typesReferenceDirectives, newSourceFile, typeReferenceResolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, typeDirectiveIsEqualTo);
|
|
101201
|
+
const typeReferenceResolutionsChanged = hasChangesInResolutions(typesReferenceDirectives, newSourceFile, typeReferenceResolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, typeDirectiveIsEqualTo, typeReferenceResolutionNameAndModeGetter);
|
|
101154
101202
|
if (typeReferenceResolutionsChanged) {
|
|
101155
101203
|
structureIsReused = 1 /* SafeModules */;
|
|
101156
|
-
newSourceFile.resolvedTypeReferenceDirectiveNames = zipToModeAwareCache(newSourceFile, typesReferenceDirectives, typeReferenceResolutions);
|
|
101204
|
+
newSourceFile.resolvedTypeReferenceDirectiveNames = zipToModeAwareCache(newSourceFile, typesReferenceDirectives, typeReferenceResolutions, typeReferenceResolutionNameAndModeGetter);
|
|
101157
101205
|
} else {
|
|
101158
101206
|
newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
|
|
101159
101207
|
}
|
|
@@ -101161,9 +101209,17 @@ ${lanes.join("\n")}
|
|
|
101161
101209
|
if (structureIsReused !== 2 /* Completely */) {
|
|
101162
101210
|
return structureIsReused;
|
|
101163
101211
|
}
|
|
101164
|
-
if (changesAffectingProgramStructure(oldOptions, options)
|
|
101212
|
+
if (changesAffectingProgramStructure(oldOptions, options)) {
|
|
101165
101213
|
return 1 /* SafeModules */;
|
|
101166
101214
|
}
|
|
101215
|
+
if (host.hasChangedAutomaticTypeDirectiveNames) {
|
|
101216
|
+
if (host.hasChangedAutomaticTypeDirectiveNames())
|
|
101217
|
+
return 1 /* SafeModules */;
|
|
101218
|
+
} else {
|
|
101219
|
+
automaticTypeDirectiveNames = getAutomaticTypeDirectiveNames(options, host);
|
|
101220
|
+
if (!arrayIsEqualTo(oldProgram.getAutomaticTypeDirectiveNames(), automaticTypeDirectiveNames))
|
|
101221
|
+
return 1 /* SafeModules */;
|
|
101222
|
+
}
|
|
101167
101223
|
missingFilePaths = oldProgram.getMissingFilePaths();
|
|
101168
101224
|
Debug.assert(newSourceFiles.length === oldProgram.getSourceFiles().length);
|
|
101169
101225
|
for (const newSourceFile of newSourceFiles) {
|
|
@@ -101187,6 +101243,8 @@ ${lanes.join("\n")}
|
|
|
101187
101243
|
fileReasons = oldProgram.getFileIncludeReasons();
|
|
101188
101244
|
fileProcessingDiagnostics = oldProgram.getFileProcessingDiagnostics();
|
|
101189
101245
|
resolvedTypeReferenceDirectives = oldProgram.getResolvedTypeReferenceDirectives();
|
|
101246
|
+
automaticTypeDirectiveNames = oldProgram.getAutomaticTypeDirectiveNames();
|
|
101247
|
+
automaticTypeDirectiveResolutions = oldProgram.getAutomaticTypeDirectiveResolutions();
|
|
101190
101248
|
sourceFileToPackageName = oldProgram.sourceFileToPackageName;
|
|
101191
101249
|
redirectTargetsMap = oldProgram.redirectTargetsMap;
|
|
101192
101250
|
usesUriStyleNodeCoreModules = oldProgram.usesUriStyleNodeCoreModules;
|
|
@@ -102130,7 +102188,8 @@ ${lanes.join("\n")}
|
|
|
102130
102188
|
}
|
|
102131
102189
|
function processTypeReferenceDirectives(file) {
|
|
102132
102190
|
const typeDirectives = file.typeReferenceDirectives;
|
|
102133
|
-
if (!typeDirectives) {
|
|
102191
|
+
if (!typeDirectives.length) {
|
|
102192
|
+
file.resolvedTypeReferenceDirectiveNames = void 0;
|
|
102134
102193
|
return;
|
|
102135
102194
|
}
|
|
102136
102195
|
const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectives, file);
|
|
@@ -102141,23 +102200,31 @@ ${lanes.join("\n")}
|
|
|
102141
102200
|
setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective, getModeForFileReference(ref, file.impliedNodeFormat));
|
|
102142
102201
|
const mode = ref.resolutionMode || file.impliedNodeFormat;
|
|
102143
102202
|
if (mode && getEmitModuleResolutionKind(options) !== 3 /* Node16 */ && getEmitModuleResolutionKind(options) !== 99 /* NodeNext */) {
|
|
102144
|
-
|
|
102203
|
+
(fileProcessingDiagnostics != null ? fileProcessingDiagnostics : fileProcessingDiagnostics = []).push({
|
|
102204
|
+
kind: 2 /* ResolutionDiagnostics */,
|
|
102205
|
+
diagnostics: [
|
|
102206
|
+
createDiagnosticForRange(file, ref, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext)
|
|
102207
|
+
]
|
|
102208
|
+
});
|
|
102145
102209
|
}
|
|
102146
102210
|
processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: 5 /* TypeReferenceDirective */, file: file.path, index });
|
|
102147
102211
|
}
|
|
102148
102212
|
}
|
|
102149
|
-
function processTypeReferenceDirective(typeReferenceDirective, mode,
|
|
102213
|
+
function processTypeReferenceDirective(typeReferenceDirective, mode, resolution, reason) {
|
|
102150
102214
|
var _a3, _b2;
|
|
102151
|
-
(_a3 = tracing) == null ? void 0 : _a3.push(tracing.Phase.Program, "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolvedTypeReferenceDirective, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : void 0 });
|
|
102152
|
-
processTypeReferenceDirectiveWorker(typeReferenceDirective, mode,
|
|
102215
|
+
(_a3 = tracing) == null ? void 0 : _a3.push(tracing.Phase.Program, "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolution.resolvedTypeReferenceDirective, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : void 0 });
|
|
102216
|
+
processTypeReferenceDirectiveWorker(typeReferenceDirective, mode, resolution, reason);
|
|
102153
102217
|
(_b2 = tracing) == null ? void 0 : _b2.pop();
|
|
102154
102218
|
}
|
|
102155
|
-
function processTypeReferenceDirectiveWorker(typeReferenceDirective, mode,
|
|
102156
|
-
|
|
102219
|
+
function processTypeReferenceDirectiveWorker(typeReferenceDirective, mode, resolution, reason) {
|
|
102220
|
+
var _a3;
|
|
102221
|
+
addResolutionDiagnostics(resolution);
|
|
102222
|
+
const previousResolution = (_a3 = resolvedTypeReferenceDirectives.get(typeReferenceDirective, mode)) == null ? void 0 : _a3.resolvedTypeReferenceDirective;
|
|
102157
102223
|
if (previousResolution && previousResolution.primary) {
|
|
102158
102224
|
return;
|
|
102159
102225
|
}
|
|
102160
102226
|
let saveResolution = true;
|
|
102227
|
+
const { resolvedTypeReferenceDirective } = resolution;
|
|
102161
102228
|
if (resolvedTypeReferenceDirective) {
|
|
102162
102229
|
if (resolvedTypeReferenceDirective.isExternalLibraryImport)
|
|
102163
102230
|
currentNodeModulesDepth++;
|
|
@@ -102188,7 +102255,7 @@ ${lanes.join("\n")}
|
|
|
102188
102255
|
addFilePreprocessingFileExplainingDiagnostic(void 0, reason, Diagnostics.Cannot_find_type_definition_file_for_0, [typeReferenceDirective]);
|
|
102189
102256
|
}
|
|
102190
102257
|
if (saveResolution) {
|
|
102191
|
-
resolvedTypeReferenceDirectives.set(typeReferenceDirective, mode,
|
|
102258
|
+
resolvedTypeReferenceDirectives.set(typeReferenceDirective, mode, resolution);
|
|
102192
102259
|
}
|
|
102193
102260
|
}
|
|
102194
102261
|
function pathForLibFile(libFileName) {
|
|
@@ -102237,8 +102304,11 @@ ${lanes.join("\n")}
|
|
|
102237
102304
|
Debug.assert(resolutions.length === moduleNames.length);
|
|
102238
102305
|
const optionsForFile = (useSourceOfProjectReferenceRedirect ? (_a3 = getRedirectReferenceForResolution(file)) == null ? void 0 : _a3.commandLine.options : void 0) || options;
|
|
102239
102306
|
for (let index = 0; index < moduleNames.length; index++) {
|
|
102240
|
-
const resolution = resolutions[index];
|
|
102241
|
-
|
|
102307
|
+
const resolution = resolutions[index].resolvedModule;
|
|
102308
|
+
const moduleName = moduleNames[index].text;
|
|
102309
|
+
const mode = getModeForUsageLocation(file, moduleNames[index]);
|
|
102310
|
+
setResolvedModule(file, moduleName, resolutions[index], mode);
|
|
102311
|
+
addResolutionDiagnosticsFromResolutionOrCache(file, moduleName, resolutions[index], mode);
|
|
102242
102312
|
if (!resolution) {
|
|
102243
102313
|
continue;
|
|
102244
102314
|
}
|
|
@@ -102879,8 +102949,8 @@ ${lanes.join("\n")}
|
|
|
102879
102949
|
if (!symlinks) {
|
|
102880
102950
|
symlinks = createSymlinkCache(currentDirectory, getCanonicalFileName);
|
|
102881
102951
|
}
|
|
102882
|
-
if (files &&
|
|
102883
|
-
symlinks.setSymlinksFromResolutions(files,
|
|
102952
|
+
if (files && automaticTypeDirectiveResolutions && !symlinks.hasProcessedResolutions()) {
|
|
102953
|
+
symlinks.setSymlinksFromResolutions(files, automaticTypeDirectiveResolutions);
|
|
102884
102954
|
}
|
|
102885
102955
|
return symlinks;
|
|
102886
102956
|
}
|
|
@@ -103123,7 +103193,7 @@ ${lanes.join("\n")}
|
|
|
103123
103193
|
}
|
|
103124
103194
|
Debug.fail("should never ask for module name at index higher than possible module name");
|
|
103125
103195
|
}
|
|
103126
|
-
var ForegroundColorEscapeSequences, gutterStyleSequence, gutterSeparator, resetEscapeSequence, ellipsis, halfIndent, indent, inferredTypesContainingFile, plainJSErrors, emitSkippedWithNoDiagnostics;
|
|
103196
|
+
var ForegroundColorEscapeSequences, gutterStyleSequence, gutterSeparator, resetEscapeSequence, ellipsis, halfIndent, indent, emptyResolution, moduleResolutionNameAndModeGetter, typeReferenceResolutionNameAndModeGetter, inferredTypesContainingFile, plainJSErrors, emitSkippedWithNoDiagnostics;
|
|
103127
103197
|
var init_program = __esm({
|
|
103128
103198
|
"src/compiler/program.ts"() {
|
|
103129
103199
|
"use strict";
|
|
@@ -103144,6 +103214,18 @@ ${lanes.join("\n")}
|
|
|
103144
103214
|
ellipsis = "...";
|
|
103145
103215
|
halfIndent = " ";
|
|
103146
103216
|
indent = " ";
|
|
103217
|
+
emptyResolution = {
|
|
103218
|
+
resolvedModule: void 0,
|
|
103219
|
+
resolvedTypeReferenceDirective: void 0
|
|
103220
|
+
};
|
|
103221
|
+
moduleResolutionNameAndModeGetter = {
|
|
103222
|
+
getName: getModuleResolutionName,
|
|
103223
|
+
getMode: (entry, file) => getModeForUsageLocation(file, entry)
|
|
103224
|
+
};
|
|
103225
|
+
typeReferenceResolutionNameAndModeGetter = {
|
|
103226
|
+
getName: getTypeReferenceResolutionName,
|
|
103227
|
+
getMode: (entry, file) => getModeForFileReference(entry, file == null ? void 0 : file.impliedNodeFormat)
|
|
103228
|
+
};
|
|
103147
103229
|
inferredTypesContainingFile = "__inferred type names__.ts";
|
|
103148
103230
|
plainJSErrors = /* @__PURE__ */ new Set([
|
|
103149
103231
|
Diagnostics.Cannot_redeclare_block_scoped_variable_0.code,
|
|
@@ -103350,7 +103432,7 @@ ${lanes.join("\n")}
|
|
|
103350
103432
|
}
|
|
103351
103433
|
}
|
|
103352
103434
|
if (sourceFile.resolvedTypeReferenceDirectiveNames) {
|
|
103353
|
-
sourceFile.resolvedTypeReferenceDirectiveNames.forEach((resolvedTypeReferenceDirective) => {
|
|
103435
|
+
sourceFile.resolvedTypeReferenceDirectiveNames.forEach(({ resolvedTypeReferenceDirective }) => {
|
|
103354
103436
|
if (!resolvedTypeReferenceDirective) {
|
|
103355
103437
|
return;
|
|
103356
103438
|
}
|
|
@@ -104900,9 +104982,9 @@ ${lanes.join("\n")}
|
|
|
104900
104982
|
finishRecordingFilesWithChangedResolutions,
|
|
104901
104983
|
startCachingPerDirectoryResolution,
|
|
104902
104984
|
finishCachingPerDirectoryResolution,
|
|
104903
|
-
|
|
104904
|
-
|
|
104905
|
-
|
|
104985
|
+
resolveModuleNameLiterals,
|
|
104986
|
+
resolveTypeReferenceDirectiveReferences,
|
|
104987
|
+
resolveSingleModuleNameWithoutWatching,
|
|
104906
104988
|
removeResolutionsFromProjectReferenceRedirects,
|
|
104907
104989
|
removeResolutionsOfFile,
|
|
104908
104990
|
hasChangedAutomaticTypeDirectiveNames: () => hasChangedAutomaticTypeDirectiveNames,
|
|
@@ -105020,14 +105102,16 @@ ${lanes.join("\n")}
|
|
|
105020
105102
|
});
|
|
105021
105103
|
hasChangedAutomaticTypeDirectiveNames = false;
|
|
105022
105104
|
}
|
|
105023
|
-
function resolveModuleName2(moduleName, containingFile, compilerOptions,
|
|
105105
|
+
function resolveModuleName2(moduleName, containingFile, compilerOptions, redirectedReference, mode) {
|
|
105106
|
+
var _a2;
|
|
105107
|
+
const host = ((_a2 = resolutionHost.getCompilerHost) == null ? void 0 : _a2.call(resolutionHost)) || resolutionHost;
|
|
105024
105108
|
const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode);
|
|
105025
105109
|
if (!resolutionHost.getGlobalCache) {
|
|
105026
105110
|
return primaryResult;
|
|
105027
105111
|
}
|
|
105028
105112
|
const globalCache = resolutionHost.getGlobalCache();
|
|
105029
105113
|
if (globalCache !== void 0 && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) {
|
|
105030
|
-
const { resolvedModule, failedLookupLocations, affectingLocations } = loadModuleFromGlobalCache(
|
|
105114
|
+
const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache(
|
|
105031
105115
|
Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName),
|
|
105032
105116
|
resolutionHost.projectName,
|
|
105033
105117
|
compilerOptions,
|
|
@@ -105037,49 +105121,55 @@ ${lanes.join("\n")}
|
|
|
105037
105121
|
);
|
|
105038
105122
|
if (resolvedModule) {
|
|
105039
105123
|
primaryResult.resolvedModule = resolvedModule;
|
|
105040
|
-
primaryResult.failedLookupLocations.
|
|
105041
|
-
primaryResult.affectingLocations.
|
|
105124
|
+
primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations);
|
|
105125
|
+
primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations);
|
|
105126
|
+
primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics);
|
|
105042
105127
|
return primaryResult;
|
|
105043
105128
|
}
|
|
105044
105129
|
}
|
|
105045
105130
|
return primaryResult;
|
|
105046
105131
|
}
|
|
105047
|
-
function
|
|
105048
|
-
return
|
|
105132
|
+
function createModuleResolutionLoader2(containingFile, redirectedReference, options) {
|
|
105133
|
+
return {
|
|
105134
|
+
nameAndMode: moduleResolutionNameAndModeGetter,
|
|
105135
|
+
resolve: (moduleName, resoluionMode) => resolveModuleName2(
|
|
105136
|
+
moduleName,
|
|
105137
|
+
containingFile,
|
|
105138
|
+
options,
|
|
105139
|
+
redirectedReference,
|
|
105140
|
+
resoluionMode
|
|
105141
|
+
)
|
|
105142
|
+
};
|
|
105049
105143
|
}
|
|
105050
105144
|
function resolveNamesWithLocalCache({
|
|
105051
|
-
|
|
105145
|
+
entries,
|
|
105052
105146
|
containingFile,
|
|
105147
|
+
containingSourceFile,
|
|
105053
105148
|
redirectedReference,
|
|
105149
|
+
options,
|
|
105054
105150
|
perFileCache,
|
|
105151
|
+
reusedNames,
|
|
105055
105152
|
loader,
|
|
105056
105153
|
getResolutionWithResolvedFileName,
|
|
105057
105154
|
shouldRetryResolution,
|
|
105058
|
-
|
|
105059
|
-
resolutionInfo,
|
|
105060
|
-
logChanges,
|
|
105061
|
-
containingSourceFile,
|
|
105062
|
-
containingSourceFileMode
|
|
105155
|
+
logChanges
|
|
105063
105156
|
}) {
|
|
105064
|
-
var _a2
|
|
105157
|
+
var _a2;
|
|
105065
105158
|
const path = resolutionHost.toPath(containingFile);
|
|
105066
105159
|
const resolutionsInFile = perFileCache.get(path) || perFileCache.set(path, createModeAwareCache()).get(path);
|
|
105067
105160
|
const resolvedModules = [];
|
|
105068
|
-
const compilerOptions = resolutionHost.getCompilationSettings();
|
|
105069
105161
|
const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path);
|
|
105070
105162
|
const program = resolutionHost.getCurrentProgram();
|
|
105071
105163
|
const oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile);
|
|
105072
105164
|
const unmatchedRedirects = oldRedirect ? !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference;
|
|
105073
105165
|
const seenNamesInFile = createModeAwareCache();
|
|
105074
|
-
|
|
105075
|
-
|
|
105076
|
-
const
|
|
105077
|
-
const mode = !isString(entry) ? isStringLiteralLike(entry) ? getModeForUsageLocation(containingSourceFile, entry) : getModeForFileReference(entry, containingSourceFileMode) : containingSourceFile ? getModeForResolutionAtIndex(containingSourceFile, i) : void 0;
|
|
105078
|
-
i++;
|
|
105166
|
+
for (const entry of entries) {
|
|
105167
|
+
const name = loader.nameAndMode.getName(entry);
|
|
105168
|
+
const mode = loader.nameAndMode.getMode(entry, containingSourceFile);
|
|
105079
105169
|
let resolution = resolutionsInFile.get(name, mode);
|
|
105080
105170
|
if (!seenNamesInFile.has(name, mode) && unmatchedRedirects || !resolution || resolution.isInvalidated || hasInvalidatedNonRelativeUnresolvedImport && !isExternalModuleNameRelative(name) && shouldRetryResolution(resolution)) {
|
|
105081
105171
|
const existingResolution = resolution;
|
|
105082
|
-
resolution = loader(name,
|
|
105172
|
+
resolution = loader.resolve(name, mode);
|
|
105083
105173
|
if (resolutionHost.onDiscoveredSymlink && resolutionIsSymlink(resolution)) {
|
|
105084
105174
|
resolutionHost.onDiscoveredSymlink();
|
|
105085
105175
|
}
|
|
@@ -105093,12 +105183,12 @@ ${lanes.join("\n")}
|
|
|
105093
105183
|
logChanges = false;
|
|
105094
105184
|
}
|
|
105095
105185
|
} else {
|
|
105096
|
-
const host = ((
|
|
105097
|
-
if (isTraceEnabled(
|
|
105186
|
+
const host = ((_a2 = resolutionHost.getCompilerHost) == null ? void 0 : _a2.call(resolutionHost)) || resolutionHost;
|
|
105187
|
+
if (isTraceEnabled(options, host) && !seenNamesInFile.has(name, mode)) {
|
|
105098
105188
|
const resolved = getResolutionWithResolvedFileName(resolution);
|
|
105099
105189
|
trace(
|
|
105100
105190
|
host,
|
|
105101
|
-
|
|
105191
|
+
perFileCache === resolvedModuleNames ? (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved : (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved,
|
|
105102
105192
|
name,
|
|
105103
105193
|
containingFile,
|
|
105104
105194
|
resolved == null ? void 0 : resolved.resolvedFileName,
|
|
@@ -105108,19 +105198,16 @@ ${lanes.join("\n")}
|
|
|
105108
105198
|
}
|
|
105109
105199
|
Debug.assert(resolution !== void 0 && !resolution.isInvalidated);
|
|
105110
105200
|
seenNamesInFile.set(name, mode, true);
|
|
105111
|
-
resolvedModules.push(
|
|
105112
|
-
}
|
|
105113
|
-
if (resolutionInfo && (loader === resolveTypeReferenceDirective2 || containingSourceFile)) {
|
|
105114
|
-
(_c = resolutionInfo.reusedNames) == null ? void 0 : _c.forEach((entry) => seenNamesInFile.set(
|
|
105115
|
-
getResolutionName(entry),
|
|
105116
|
-
!isString(entry) && isStringLiteralLike(entry) ? getModeForUsageLocation(containingSourceFile, entry) : getModeForFileReference(entry, containingSourceFileMode),
|
|
105117
|
-
true
|
|
105118
|
-
));
|
|
105119
|
-
reusedNames = void 0;
|
|
105201
|
+
resolvedModules.push(resolution);
|
|
105120
105202
|
}
|
|
105203
|
+
reusedNames == null ? void 0 : reusedNames.forEach((entry) => seenNamesInFile.set(
|
|
105204
|
+
loader.nameAndMode.getName(entry),
|
|
105205
|
+
loader.nameAndMode.getMode(entry, containingSourceFile),
|
|
105206
|
+
true
|
|
105207
|
+
));
|
|
105121
105208
|
if (resolutionsInFile.size() !== seenNamesInFile.size()) {
|
|
105122
105209
|
resolutionsInFile.forEach((resolution, name, mode) => {
|
|
105123
|
-
if (!seenNamesInFile.has(name, mode)
|
|
105210
|
+
if (!seenNamesInFile.has(name, mode)) {
|
|
105124
105211
|
stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName);
|
|
105125
105212
|
resolutionsInFile.delete(name, mode);
|
|
105126
105213
|
}
|
|
@@ -105145,39 +105232,53 @@ ${lanes.join("\n")}
|
|
|
105145
105232
|
return oldResult.resolvedFileName === newResult.resolvedFileName;
|
|
105146
105233
|
}
|
|
105147
105234
|
}
|
|
105148
|
-
function
|
|
105235
|
+
function resolveTypeReferenceDirectiveReferences(typeDirectiveReferences, containingFile, redirectedReference, options, containingSourceFile, reusedNames) {
|
|
105236
|
+
var _a2;
|
|
105149
105237
|
return resolveNamesWithLocalCache({
|
|
105150
|
-
|
|
105238
|
+
entries: typeDirectiveReferences,
|
|
105151
105239
|
containingFile,
|
|
105240
|
+
containingSourceFile,
|
|
105152
105241
|
redirectedReference,
|
|
105242
|
+
options,
|
|
105243
|
+
reusedNames,
|
|
105153
105244
|
perFileCache: resolvedTypeReferenceDirectives,
|
|
105154
|
-
loader:
|
|
105245
|
+
loader: createTypeReferenceResolutionLoader(
|
|
105246
|
+
containingFile,
|
|
105247
|
+
redirectedReference,
|
|
105248
|
+
options,
|
|
105249
|
+
((_a2 = resolutionHost.getCompilerHost) == null ? void 0 : _a2.call(resolutionHost)) || resolutionHost,
|
|
105250
|
+
typeReferenceDirectiveResolutionCache
|
|
105251
|
+
),
|
|
105155
105252
|
getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective2,
|
|
105156
|
-
shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0
|
|
105157
|
-
containingSourceFileMode: containingFileMode,
|
|
105158
|
-
resolutionInfo
|
|
105253
|
+
shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0
|
|
105159
105254
|
});
|
|
105160
105255
|
}
|
|
105161
|
-
function
|
|
105256
|
+
function resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) {
|
|
105162
105257
|
return resolveNamesWithLocalCache({
|
|
105163
|
-
|
|
105258
|
+
entries: moduleLiterals,
|
|
105164
105259
|
containingFile,
|
|
105260
|
+
containingSourceFile,
|
|
105165
105261
|
redirectedReference,
|
|
105262
|
+
options,
|
|
105263
|
+
reusedNames,
|
|
105166
105264
|
perFileCache: resolvedModuleNames,
|
|
105167
|
-
loader:
|
|
105265
|
+
loader: createModuleResolutionLoader2(
|
|
105266
|
+
containingFile,
|
|
105267
|
+
redirectedReference,
|
|
105268
|
+
options
|
|
105269
|
+
),
|
|
105168
105270
|
getResolutionWithResolvedFileName: getResolvedModule2,
|
|
105169
105271
|
shouldRetryResolution: (resolution) => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension),
|
|
105170
|
-
|
|
105171
|
-
resolutionInfo,
|
|
105172
|
-
logChanges: logChangesWhenResolvingModule,
|
|
105173
|
-
containingSourceFile
|
|
105272
|
+
logChanges: logChangesWhenResolvingModule
|
|
105174
105273
|
});
|
|
105175
105274
|
}
|
|
105176
|
-
function
|
|
105177
|
-
const
|
|
105178
|
-
|
|
105179
|
-
|
|
105180
|
-
|
|
105275
|
+
function resolveSingleModuleNameWithoutWatching(moduleName, containingFile) {
|
|
105276
|
+
const path = resolutionHost.toPath(containingFile);
|
|
105277
|
+
const resolutionsInFile = resolvedModuleNames.get(path);
|
|
105278
|
+
const resolution = resolutionsInFile == null ? void 0 : resolutionsInFile.get(moduleName, void 0);
|
|
105279
|
+
if (resolution && !resolution.isInvalidated)
|
|
105280
|
+
return resolution;
|
|
105281
|
+
return resolveModuleName2(moduleName, containingFile, resolutionHost.getCompilationSettings());
|
|
105181
105282
|
}
|
|
105182
105283
|
function isNodeModulesAtTypesDirectory(dirPath) {
|
|
105183
105284
|
return endsWith(dirPath, "/node_modules/@types");
|
|
@@ -105256,37 +105357,39 @@ ${lanes.join("\n")}
|
|
|
105256
105357
|
function watchFailedLookupLocationOfResolution(resolution) {
|
|
105257
105358
|
Debug.assert(!!resolution.refCount);
|
|
105258
105359
|
const { failedLookupLocations, affectingLocations } = resolution;
|
|
105259
|
-
if (!failedLookupLocations.length && !affectingLocations.length)
|
|
105360
|
+
if (!(failedLookupLocations == null ? void 0 : failedLookupLocations.length) && !(affectingLocations == null ? void 0 : affectingLocations.length))
|
|
105260
105361
|
return;
|
|
105261
|
-
if (failedLookupLocations.length)
|
|
105362
|
+
if (failedLookupLocations == null ? void 0 : failedLookupLocations.length)
|
|
105262
105363
|
resolutionsWithFailedLookups.push(resolution);
|
|
105263
105364
|
let setAtRoot = false;
|
|
105264
|
-
|
|
105265
|
-
const
|
|
105266
|
-
|
|
105267
|
-
|
|
105268
|
-
|
|
105269
|
-
|
|
105270
|
-
|
|
105271
|
-
|
|
105272
|
-
|
|
105273
|
-
|
|
105274
|
-
|
|
105275
|
-
|
|
105276
|
-
|
|
105277
|
-
|
|
105365
|
+
if (failedLookupLocations) {
|
|
105366
|
+
for (const failedLookupLocation of failedLookupLocations) {
|
|
105367
|
+
const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation);
|
|
105368
|
+
const toWatch = getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath);
|
|
105369
|
+
if (toWatch) {
|
|
105370
|
+
const { dir, dirPath, nonRecursive } = toWatch;
|
|
105371
|
+
if (!isPathWithDefaultFailedLookupExtension(failedLookupLocationPath)) {
|
|
105372
|
+
const refCount = customFailedLookupPaths.get(failedLookupLocationPath) || 0;
|
|
105373
|
+
customFailedLookupPaths.set(failedLookupLocationPath, refCount + 1);
|
|
105374
|
+
}
|
|
105375
|
+
if (dirPath === rootPath) {
|
|
105376
|
+
Debug.assert(!nonRecursive);
|
|
105377
|
+
setAtRoot = true;
|
|
105378
|
+
} else {
|
|
105379
|
+
setDirectoryWatcher(dir, dirPath, nonRecursive);
|
|
105380
|
+
}
|
|
105278
105381
|
}
|
|
105279
105382
|
}
|
|
105383
|
+
if (setAtRoot) {
|
|
105384
|
+
setDirectoryWatcher(rootDir, rootPath, true);
|
|
105385
|
+
}
|
|
105280
105386
|
}
|
|
105281
|
-
|
|
105282
|
-
setDirectoryWatcher(rootDir, rootPath, true);
|
|
105283
|
-
}
|
|
105284
|
-
watchAffectingLocationsOfResolution(resolution, !failedLookupLocations.length);
|
|
105387
|
+
watchAffectingLocationsOfResolution(resolution, !(failedLookupLocations == null ? void 0 : failedLookupLocations.length));
|
|
105285
105388
|
}
|
|
105286
105389
|
function watchAffectingLocationsOfResolution(resolution, addToResolutionsWithOnlyAffectingLocations) {
|
|
105287
105390
|
Debug.assert(!!resolution.refCount);
|
|
105288
105391
|
const { affectingLocations } = resolution;
|
|
105289
|
-
if (!affectingLocations.length)
|
|
105392
|
+
if (!(affectingLocations == null ? void 0 : affectingLocations.length))
|
|
105290
105393
|
return;
|
|
105291
105394
|
if (addToResolutionsWithOnlyAffectingLocations)
|
|
105292
105395
|
resolutionsWithOnlyAffectingLocations.push(resolution);
|
|
@@ -105404,12 +105507,14 @@ ${lanes.join("\n")}
|
|
|
105404
105507
|
if (removeAtRoot) {
|
|
105405
105508
|
removeDirectoryWatcher(rootPath);
|
|
105406
105509
|
}
|
|
105407
|
-
} else if (affectingLocations.length) {
|
|
105510
|
+
} else if (affectingLocations == null ? void 0 : affectingLocations.length) {
|
|
105408
105511
|
unorderedRemoveItem(resolutionsWithOnlyAffectingLocations, resolution);
|
|
105409
105512
|
}
|
|
105410
|
-
|
|
105411
|
-
const
|
|
105412
|
-
|
|
105513
|
+
if (affectingLocations) {
|
|
105514
|
+
for (const affectingLocation of affectingLocations) {
|
|
105515
|
+
const watcher = fileWatchesOfAffectingLocations.get(affectingLocation);
|
|
105516
|
+
watcher.resolutions--;
|
|
105517
|
+
}
|
|
105413
105518
|
}
|
|
105414
105519
|
}
|
|
105415
105520
|
function removeDirectoryWatcher(dirPath) {
|
|
@@ -105531,17 +105636,19 @@ ${lanes.join("\n")}
|
|
|
105531
105636
|
return invalidated;
|
|
105532
105637
|
}
|
|
105533
105638
|
function canInvalidateFailedLookupResolution(resolution) {
|
|
105639
|
+
var _a2;
|
|
105534
105640
|
if (canInvalidatedFailedLookupResolutionWithAffectingLocation(resolution))
|
|
105535
105641
|
return true;
|
|
105536
105642
|
if (!failedLookupChecks && !startsWithPathChecks && !isInDirectoryChecks)
|
|
105537
105643
|
return false;
|
|
105538
|
-
return resolution.failedLookupLocations.some((location) => isInvalidatedFailedLookup(resolutionHost.toPath(location)));
|
|
105644
|
+
return (_a2 = resolution.failedLookupLocations) == null ? void 0 : _a2.some((location) => isInvalidatedFailedLookup(resolutionHost.toPath(location)));
|
|
105539
105645
|
}
|
|
105540
105646
|
function isInvalidatedFailedLookup(locationPath) {
|
|
105541
105647
|
return (failedLookupChecks == null ? void 0 : failedLookupChecks.has(locationPath)) || firstDefinedIterator((startsWithPathChecks == null ? void 0 : startsWithPathChecks.keys()) || emptyIterator, (fileOrDirectoryPath) => startsWith(locationPath, fileOrDirectoryPath) ? true : void 0) || firstDefinedIterator((isInDirectoryChecks == null ? void 0 : isInDirectoryChecks.keys()) || emptyIterator, (fileOrDirectoryPath) => isInDirectoryPath(fileOrDirectoryPath, locationPath) ? true : void 0);
|
|
105542
105648
|
}
|
|
105543
105649
|
function canInvalidatedFailedLookupResolutionWithAffectingLocation(resolution) {
|
|
105544
|
-
|
|
105650
|
+
var _a2;
|
|
105651
|
+
return !!affectingPathChecks && ((_a2 = resolution.affectingLocations) == null ? void 0 : _a2.some((location) => affectingPathChecks.has(location)));
|
|
105545
105652
|
}
|
|
105546
105653
|
function closeTypeRootsWatch() {
|
|
105547
105654
|
clearMap(typeRootsWatches, closeFileWatcher);
|
|
@@ -106346,10 +106453,18 @@ ${lanes.join("\n")}
|
|
|
106346
106453
|
configFileName ? getDirectoryPath(getNormalizedAbsolutePath(configFileName, currentDirectory)) : currentDirectory,
|
|
106347
106454
|
false
|
|
106348
106455
|
);
|
|
106349
|
-
compilerHost.
|
|
106350
|
-
compilerHost.
|
|
106351
|
-
compilerHost.
|
|
106352
|
-
|
|
106456
|
+
compilerHost.resolveModuleNameLiterals = maybeBind(host, host.resolveModuleNameLiterals);
|
|
106457
|
+
compilerHost.resolveModuleNames = maybeBind(host, host.resolveModuleNames);
|
|
106458
|
+
if (!compilerHost.resolveModuleNameLiterals && !compilerHost.resolveModuleNames) {
|
|
106459
|
+
compilerHost.resolveModuleNameLiterals = resolutionCache.resolveModuleNameLiterals.bind(resolutionCache);
|
|
106460
|
+
}
|
|
106461
|
+
compilerHost.resolveTypeReferenceDirectiveReferences = maybeBind(host, host.resolveTypeReferenceDirectiveReferences);
|
|
106462
|
+
compilerHost.resolveTypeReferenceDirectives = maybeBind(host, host.resolveTypeReferenceDirectives);
|
|
106463
|
+
if (!compilerHost.resolveTypeReferenceDirectiveReferences && !compilerHost.resolveTypeReferenceDirectives) {
|
|
106464
|
+
compilerHost.resolveTypeReferenceDirectiveReferences = resolutionCache.resolveTypeReferenceDirectiveReferences.bind(resolutionCache);
|
|
106465
|
+
}
|
|
106466
|
+
compilerHost.getModuleResolutionCache = host.resolveModuleNameLiterals || host.resolveModuleNames ? maybeBind(host, host.getModuleResolutionCache) : () => resolutionCache.getModuleResolutionCache();
|
|
106467
|
+
const userProvidedResolution = !!host.resolveModuleNameLiterals || !!host.resolveTypeReferenceDirectiveReferences || !!host.resolveModuleNames || !!host.resolveTypeReferenceDirectives;
|
|
106353
106468
|
const customHasInvalidatedResolutions = userProvidedResolution ? maybeBind(host, host.hasInvalidatedResolutions) || returnTrue : returnFalse;
|
|
106354
106469
|
builderProgram = readBuilderProgram(compilerOptions, compilerHost);
|
|
106355
106470
|
synchronizeProgram();
|
|
@@ -107020,19 +107135,38 @@ ${lanes.join("\n")}
|
|
|
107020
107135
|
const compilerHost = createCompilerHostFromProgramHost(host, () => state.projectCompilerOptions);
|
|
107021
107136
|
setGetSourceFileAsHashVersioned(compilerHost);
|
|
107022
107137
|
compilerHost.getParsedCommandLine = (fileName) => parseConfigFile(state, fileName, toResolvedConfigFilePath(state, fileName));
|
|
107138
|
+
compilerHost.resolveModuleNameLiterals = maybeBind(host, host.resolveModuleNameLiterals);
|
|
107139
|
+
compilerHost.resolveTypeReferenceDirectiveReferences = maybeBind(host, host.resolveTypeReferenceDirectiveReferences);
|
|
107023
107140
|
compilerHost.resolveModuleNames = maybeBind(host, host.resolveModuleNames);
|
|
107024
107141
|
compilerHost.resolveTypeReferenceDirectives = maybeBind(host, host.resolveTypeReferenceDirectives);
|
|
107025
107142
|
compilerHost.getModuleResolutionCache = maybeBind(host, host.getModuleResolutionCache);
|
|
107026
|
-
|
|
107027
|
-
|
|
107028
|
-
|
|
107029
|
-
|
|
107030
|
-
|
|
107143
|
+
let moduleResolutionCache, typeReferenceDirectiveResolutionCache;
|
|
107144
|
+
if (!compilerHost.resolveModuleNameLiterals && !compilerHost.resolveModuleNames) {
|
|
107145
|
+
moduleResolutionCache = createModuleResolutionCache(currentDirectory, getCanonicalFileName);
|
|
107146
|
+
compilerHost.resolveModuleNameLiterals = (moduleNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache(
|
|
107147
|
+
moduleNames,
|
|
107148
|
+
containingFile,
|
|
107149
|
+
redirectedReference,
|
|
107150
|
+
options2,
|
|
107151
|
+
containingSourceFile,
|
|
107152
|
+
host,
|
|
107153
|
+
moduleResolutionCache,
|
|
107154
|
+
createModuleResolutionLoader
|
|
107155
|
+
);
|
|
107031
107156
|
compilerHost.getModuleResolutionCache = () => moduleResolutionCache;
|
|
107032
107157
|
}
|
|
107033
|
-
if (!compilerHost.resolveTypeReferenceDirectives) {
|
|
107034
|
-
|
|
107035
|
-
compilerHost.
|
|
107158
|
+
if (!compilerHost.resolveTypeReferenceDirectiveReferences && !compilerHost.resolveTypeReferenceDirectives) {
|
|
107159
|
+
typeReferenceDirectiveResolutionCache = createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, void 0, moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache());
|
|
107160
|
+
compilerHost.resolveTypeReferenceDirectiveReferences = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache(
|
|
107161
|
+
typeDirectiveNames,
|
|
107162
|
+
containingFile,
|
|
107163
|
+
redirectedReference,
|
|
107164
|
+
options2,
|
|
107165
|
+
containingSourceFile,
|
|
107166
|
+
host,
|
|
107167
|
+
typeReferenceDirectiveResolutionCache,
|
|
107168
|
+
createTypeReferenceResolutionLoader
|
|
107169
|
+
);
|
|
107036
107170
|
}
|
|
107037
107171
|
compilerHost.getBuildInfo = (fileName, configFilePath) => getBuildInfo3(state, fileName, toResolvedConfigFilePath(state, configFilePath), void 0);
|
|
107038
107172
|
const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(hostWithWatch, options);
|
|
@@ -114081,13 +114215,14 @@ ${lanes.join("\n")}
|
|
|
114081
114215
|
return ensurePathIsNonModuleName(combineNormal(pathA, pathB));
|
|
114082
114216
|
}
|
|
114083
114217
|
function getSourceFileToImport(importedModuleSymbol, importLiteral, importingSourceFile, program, host, oldToNew) {
|
|
114218
|
+
var _a2;
|
|
114084
114219
|
if (importedModuleSymbol) {
|
|
114085
114220
|
const oldFileName = find(importedModuleSymbol.declarations, isSourceFile).fileName;
|
|
114086
114221
|
const newFileName = oldToNew(oldFileName);
|
|
114087
114222
|
return newFileName === void 0 ? { newFileName: oldFileName, updated: false } : { newFileName, updated: true };
|
|
114088
114223
|
} else {
|
|
114089
114224
|
const mode = getModeForUsageLocation(importingSourceFile, importLiteral);
|
|
114090
|
-
const resolved = host.resolveModuleNames ?
|
|
114225
|
+
const resolved = host.resolveModuleNameLiterals || !host.resolveModuleNames ? (_a2 = importingSourceFile.resolvedModules) == null ? void 0 : _a2.get(importLiteral.text, mode) : host.getResolvedModuleWithFailedLookupLocationsFromCache && host.getResolvedModuleWithFailedLookupLocationsFromCache(importLiteral.text, importingSourceFile.fileName, mode);
|
|
114091
114226
|
return getSourceFileToImportFromResolved(importLiteral, resolved, oldToNew, program.getSourceFiles());
|
|
114092
114227
|
}
|
|
114093
114228
|
}
|
|
@@ -116408,6 +116543,8 @@ ${lanes.join("\n")}
|
|
|
116408
116543
|
getModuleResolutionCache: maybeBind(host, host.getModuleResolutionCache),
|
|
116409
116544
|
createHash: maybeBind(host, host.createHash),
|
|
116410
116545
|
resolveTypeReferenceDirectives: maybeBind(host, host.resolveTypeReferenceDirectives),
|
|
116546
|
+
resolveModuleNameLiterals: maybeBind(host, host.resolveModuleNameLiterals),
|
|
116547
|
+
resolveTypeReferenceDirectiveReferences: maybeBind(host, host.resolveTypeReferenceDirectiveReferences),
|
|
116411
116548
|
useSourceOfProjectReferenceRedirect: maybeBind(host, host.useSourceOfProjectReferenceRedirect),
|
|
116412
116549
|
getParsedCommandLine
|
|
116413
116550
|
};
|
|
@@ -124604,6 +124741,7 @@ ${lanes.join("\n")}
|
|
|
124604
124741
|
|
|
124605
124742
|
// src/services/codefixes/fixAddMissingMember.ts
|
|
124606
124743
|
function getInfo7(sourceFile, tokenPos, errorCode, checker, program) {
|
|
124744
|
+
var _a2;
|
|
124607
124745
|
const token = getTokenAtPosition(sourceFile, tokenPos);
|
|
124608
124746
|
const parent2 = token.parent;
|
|
124609
124747
|
if (errorCode === Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code) {
|
|
@@ -124639,7 +124777,7 @@ ${lanes.join("\n")}
|
|
|
124639
124777
|
return { kind: 4 /* JsxAttributes */, token, attributes, parentDeclaration: token.parent };
|
|
124640
124778
|
}
|
|
124641
124779
|
if (isIdentifier(token)) {
|
|
124642
|
-
const type = checker.getContextualType(token);
|
|
124780
|
+
const type = (_a2 = checker.getContextualType(token)) == null ? void 0 : _a2.getNonNullableType();
|
|
124643
124781
|
if (type && getObjectFlags(type) & 16 /* Anonymous */) {
|
|
124644
124782
|
const signature = firstOrUndefined(checker.getSignaturesOfType(type, 0 /* Call */));
|
|
124645
124783
|
if (signature === void 0)
|
|
@@ -133509,6 +133647,7 @@ ${lanes.join("\n")}
|
|
|
133509
133647
|
});
|
|
133510
133648
|
}
|
|
133511
133649
|
function findModuleReferences(program, sourceFiles, searchModuleSymbol) {
|
|
133650
|
+
var _a2;
|
|
133512
133651
|
const refs = [];
|
|
133513
133652
|
const checker = program.getTypeChecker();
|
|
133514
133653
|
for (const referencingFile of sourceFiles) {
|
|
@@ -133520,7 +133659,7 @@ ${lanes.join("\n")}
|
|
|
133520
133659
|
}
|
|
133521
133660
|
}
|
|
133522
133661
|
for (const ref of referencingFile.typeReferenceDirectives) {
|
|
133523
|
-
const referenced = program.getResolvedTypeReferenceDirectives().get(ref.fileName, ref.resolutionMode || referencingFile.impliedNodeFormat);
|
|
133662
|
+
const referenced = (_a2 = program.getResolvedTypeReferenceDirectives().get(ref.fileName, ref.resolutionMode || referencingFile.impliedNodeFormat)) == null ? void 0 : _a2.resolvedTypeReferenceDirective;
|
|
133524
133663
|
if (referenced !== void 0 && referenced.resolvedFileName === searchSourceFile.fileName) {
|
|
133525
133664
|
refs.push({ kind: "reference", referencingFile, ref });
|
|
133526
133665
|
}
|
|
@@ -134231,7 +134370,7 @@ ${lanes.join("\n")}
|
|
|
134231
134370
|
})(FindReferencesUse || {});
|
|
134232
134371
|
((Core2) => {
|
|
134233
134372
|
function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) {
|
|
134234
|
-
var _a2, _b;
|
|
134373
|
+
var _a2, _b, _c;
|
|
134235
134374
|
node = getAdjustedNode(node, options);
|
|
134236
134375
|
if (isSourceFile(node)) {
|
|
134237
134376
|
const resolvedRef = ts_GoToDefinition_exports.getReferenceAtPosition(node, position, program);
|
|
@@ -134263,7 +134402,7 @@ ${lanes.join("\n")}
|
|
|
134263
134402
|
if (!options.implementations && isStringLiteralLike(node)) {
|
|
134264
134403
|
if (isModuleSpecifierLike(node)) {
|
|
134265
134404
|
const fileIncludeReasons = program.getFileIncludeReasons();
|
|
134266
|
-
const referencedFileName = (_b = (_a2 = node.getSourceFile().resolvedModules) == null ? void 0 : _a2.get(node.text, getModeForUsageLocation(node.getSourceFile(), node))) == null ? void 0 : _b.resolvedFileName;
|
|
134405
|
+
const referencedFileName = (_c = (_b = (_a2 = node.getSourceFile().resolvedModules) == null ? void 0 : _a2.get(node.text, getModeForUsageLocation(node.getSourceFile(), node))) == null ? void 0 : _b.resolvedModule) == null ? void 0 : _c.resolvedFileName;
|
|
134267
134406
|
const referencedFile = referencedFileName ? program.getSourceFile(referencedFileName) : void 0;
|
|
134268
134407
|
if (referencedFile) {
|
|
134269
134408
|
return [{ definition: { type: 4 /* String */, node }, references: getReferencesForNonModule(referencedFile, fileIncludeReasons, program) || emptyArray }];
|
|
@@ -135508,7 +135647,7 @@ ${lanes.join("\n")}
|
|
|
135508
135647
|
|
|
135509
135648
|
// src/services/goToDefinition.ts
|
|
135510
135649
|
function getDefinitionAtPosition(program, sourceFile, position, searchOtherFilesOnly, stopAtAlias) {
|
|
135511
|
-
var _a2;
|
|
135650
|
+
var _a2, _b;
|
|
135512
135651
|
const resolvedRef = getReferenceAtPosition(sourceFile, position, program);
|
|
135513
135652
|
const fileReferenceDefinition = resolvedRef && [getDefinitionInfoForFileReference(resolvedRef.reference.fileName, resolvedRef.fileName, resolvedRef.unverified)] || emptyArray;
|
|
135514
135653
|
if (resolvedRef == null ? void 0 : resolvedRef.file) {
|
|
@@ -135554,7 +135693,7 @@ ${lanes.join("\n")}
|
|
|
135554
135693
|
}
|
|
135555
135694
|
}
|
|
135556
135695
|
if (!symbol && isModuleSpecifierLike(fallbackNode)) {
|
|
135557
|
-
const ref = (_a2 = sourceFile.resolvedModules) == null ? void 0 : _a2.get(fallbackNode.text, getModeForUsageLocation(sourceFile, fallbackNode));
|
|
135696
|
+
const ref = (_b = (_a2 = sourceFile.resolvedModules) == null ? void 0 : _a2.get(fallbackNode.text, getModeForUsageLocation(sourceFile, fallbackNode))) == null ? void 0 : _b.resolvedModule;
|
|
135558
135697
|
if (ref) {
|
|
135559
135698
|
return [{
|
|
135560
135699
|
name: fallbackNode.text,
|
|
@@ -135632,7 +135771,7 @@ ${lanes.join("\n")}
|
|
|
135632
135771
|
return getDefinitionFromSymbol(typeChecker, symbol, node);
|
|
135633
135772
|
}
|
|
135634
135773
|
function getReferenceAtPosition(sourceFile, position, program) {
|
|
135635
|
-
var _a2, _b;
|
|
135774
|
+
var _a2, _b, _c, _d;
|
|
135636
135775
|
const referencePath = findReferenceInPosition(sourceFile.referencedFiles, position);
|
|
135637
135776
|
if (referencePath) {
|
|
135638
135777
|
const file = program.getSourceFileFromReference(sourceFile, referencePath);
|
|
@@ -135640,7 +135779,7 @@ ${lanes.join("\n")}
|
|
|
135640
135779
|
}
|
|
135641
135780
|
const typeReferenceDirective = findReferenceInPosition(sourceFile.typeReferenceDirectives, position);
|
|
135642
135781
|
if (typeReferenceDirective) {
|
|
135643
|
-
const reference = program.getResolvedTypeReferenceDirectives().get(typeReferenceDirective.fileName, typeReferenceDirective.resolutionMode || sourceFile.impliedNodeFormat);
|
|
135782
|
+
const reference = (_a2 = program.getResolvedTypeReferenceDirectives().get(typeReferenceDirective.fileName, typeReferenceDirective.resolutionMode || sourceFile.impliedNodeFormat)) == null ? void 0 : _a2.resolvedTypeReferenceDirective;
|
|
135644
135783
|
const file = reference && program.getSourceFile(reference.resolvedFileName);
|
|
135645
135784
|
return file && { reference: typeReferenceDirective, fileName: file.fileName, file, unverified: false };
|
|
135646
135785
|
}
|
|
@@ -135649,10 +135788,10 @@ ${lanes.join("\n")}
|
|
|
135649
135788
|
const file = program.getLibFileFromReference(libReferenceDirective);
|
|
135650
135789
|
return file && { reference: libReferenceDirective, fileName: file.fileName, file, unverified: false };
|
|
135651
135790
|
}
|
|
135652
|
-
if ((
|
|
135791
|
+
if ((_b = sourceFile.resolvedModules) == null ? void 0 : _b.size()) {
|
|
135653
135792
|
const node = getTouchingToken(sourceFile, position);
|
|
135654
135793
|
if (isModuleSpecifierLike(node) && isExternalModuleNameRelative(node.text) && sourceFile.resolvedModules.has(node.text, getModeForUsageLocation(sourceFile, node))) {
|
|
135655
|
-
const verifiedFileName = (
|
|
135794
|
+
const verifiedFileName = (_d = (_c = sourceFile.resolvedModules.get(node.text, getModeForUsageLocation(sourceFile, node))) == null ? void 0 : _c.resolvedModule) == null ? void 0 : _d.resolvedFileName;
|
|
135656
135795
|
const fileName = verifiedFileName || resolvePath(getDirectoryPath(sourceFile.fileName), node.text);
|
|
135657
135796
|
return {
|
|
135658
135797
|
file: program.getSourceFile(fileName),
|
|
@@ -137882,7 +138021,8 @@ ${lanes.join("\n")}
|
|
|
137882
138021
|
changes.insertNodeBefore(file, enclosingNode, ignoreSourceNewlines(newTypeNode), true);
|
|
137883
138022
|
changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode(id.name, void 0))), { leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude, trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.ExcludeWhitespace });
|
|
137884
138023
|
}
|
|
137885
|
-
function doTypedefChange(changes,
|
|
138024
|
+
function doTypedefChange(changes, context, file, name, info) {
|
|
138025
|
+
var _a2;
|
|
137886
138026
|
const { enclosingNode, selection, typeParameters } = info;
|
|
137887
138027
|
setEmitFlags(selection, 3072 /* NoComments */ | 4096 /* NoNestedComments */);
|
|
137888
138028
|
const node = factory.createJSDocTypedefTag(
|
|
@@ -137904,7 +138044,7 @@ ${lanes.join("\n")}
|
|
|
137904
138044
|
const jsDoc = factory.createJSDocComment(void 0, factory.createNodeArray(concatenate(templates, [node])));
|
|
137905
138045
|
if (isJSDoc(enclosingNode)) {
|
|
137906
138046
|
const pos = enclosingNode.getStart(file);
|
|
137907
|
-
const newLineCharacter =
|
|
138047
|
+
const newLineCharacter = getNewLineOrDefaultFromHost(context.host, (_a2 = context.formatContext) == null ? void 0 : _a2.options);
|
|
137908
138048
|
changes.insertNodeAt(file, enclosingNode.getStart(file), jsDoc, {
|
|
137909
138049
|
suffix: newLineCharacter + newLineCharacter + file.text.slice(getPrecedingNonSpaceCharacterPosition(file.text, pos - 1), pos)
|
|
137910
138050
|
});
|
|
@@ -137969,7 +138109,7 @@ ${lanes.join("\n")}
|
|
|
137969
138109
|
return emptyArray;
|
|
137970
138110
|
},
|
|
137971
138111
|
getEditsForAction: function getRefactorEditsToExtractType(context, actionName2) {
|
|
137972
|
-
const { file
|
|
138112
|
+
const { file } = context;
|
|
137973
138113
|
const info = getRangeToExtract(context);
|
|
137974
138114
|
Debug.assert(info && !isRefactorErrorInfo(info), "Expected to find a range to extract");
|
|
137975
138115
|
const name = getUniqueName("NewType", file);
|
|
@@ -137980,7 +138120,7 @@ ${lanes.join("\n")}
|
|
|
137980
138120
|
return doTypeAliasChange(changes, file, name, info);
|
|
137981
138121
|
case extractToTypeDefAction.name:
|
|
137982
138122
|
Debug.assert(info.isJS, "Invalid actionName/JS combo");
|
|
137983
|
-
return doTypedefChange(changes,
|
|
138123
|
+
return doTypedefChange(changes, context, file, name, info);
|
|
137984
138124
|
case extractToInterfaceAction.name:
|
|
137985
138125
|
Debug.assert(!info.isJS && !!info.typeElements, "Invalid actionName/JS combo");
|
|
137986
138126
|
return doInterfaceChange(changes, file, name, info);
|
|
@@ -149032,6 +149172,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
149032
149172
|
createModuleBlock: () => createModuleBlock,
|
|
149033
149173
|
createModuleDeclaration: () => createModuleDeclaration,
|
|
149034
149174
|
createModuleResolutionCache: () => createModuleResolutionCache,
|
|
149175
|
+
createModuleResolutionLoader: () => createModuleResolutionLoader,
|
|
149035
149176
|
createModuleSpecifierResolutionHost: () => createModuleSpecifierResolutionHost,
|
|
149036
149177
|
createMultiMap: () => createMultiMap,
|
|
149037
149178
|
createNamedExports: () => createNamedExports,
|
|
@@ -149154,6 +149295,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
149154
149295
|
createTypeQueryNode: () => createTypeQueryNode,
|
|
149155
149296
|
createTypeReferenceDirectiveResolutionCache: () => createTypeReferenceDirectiveResolutionCache,
|
|
149156
149297
|
createTypeReferenceNode: () => createTypeReferenceNode,
|
|
149298
|
+
createTypeReferenceResolutionLoader: () => createTypeReferenceResolutionLoader,
|
|
149157
149299
|
createUnderscoreEscapedMultiMap: () => createUnderscoreEscapedMultiMap,
|
|
149158
149300
|
createUnionTypeNode: () => createUnionTypeNode,
|
|
149159
149301
|
createUniqueName: () => createUniqueName,
|
|
@@ -149643,9 +149785,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
149643
149785
|
getRenameLocation: () => getRenameLocation,
|
|
149644
149786
|
getReplacementSpanForContextToken: () => getReplacementSpanForContextToken,
|
|
149645
149787
|
getResolutionDiagnostic: () => getResolutionDiagnostic,
|
|
149646
|
-
getResolutionMode: () => getResolutionMode,
|
|
149647
149788
|
getResolutionModeOverrideForClause: () => getResolutionModeOverrideForClause,
|
|
149648
|
-
getResolutionName: () => getResolutionName,
|
|
149649
149789
|
getResolvedExternalModuleName: () => getResolvedExternalModuleName,
|
|
149650
149790
|
getResolvedModule: () => getResolvedModule,
|
|
149651
149791
|
getResolvedTypeReferenceDirective: () => getResolvedTypeReferenceDirective,
|
|
@@ -150464,7 +150604,6 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
150464
150604
|
listFiles: () => listFiles,
|
|
150465
150605
|
loadModuleFromGlobalCache: () => loadModuleFromGlobalCache,
|
|
150466
150606
|
loadWithModeAwareCache: () => loadWithModeAwareCache,
|
|
150467
|
-
loadWithTypeDirectiveCache: () => loadWithTypeDirectiveCache,
|
|
150468
150607
|
makeIdentifierFromModuleName: () => makeIdentifierFromModuleName,
|
|
150469
150608
|
makeImport: () => makeImport,
|
|
150470
150609
|
makeImportIfNecessary: () => makeImportIfNecessary,
|
|
@@ -150496,6 +150635,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
150496
150635
|
modifiersToFlags: () => modifiersToFlags,
|
|
150497
150636
|
moduleOptionDeclaration: () => moduleOptionDeclaration,
|
|
150498
150637
|
moduleResolutionIsEqualTo: () => moduleResolutionIsEqualTo,
|
|
150638
|
+
moduleResolutionNameAndModeGetter: () => moduleResolutionNameAndModeGetter,
|
|
150499
150639
|
moduleResolutionOptionDeclarations: () => moduleResolutionOptionDeclarations,
|
|
150500
150640
|
moduleResolutionRespectsExports: () => moduleResolutionRespectsExports,
|
|
150501
150641
|
moduleResolutionUsesNodeModules: () => moduleResolutionUsesNodeModules,
|
|
@@ -150872,6 +151012,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
150872
151012
|
typeHasCallOrConstructSignatures: () => typeHasCallOrConstructSignatures,
|
|
150873
151013
|
typeKeywords: () => typeKeywords,
|
|
150874
151014
|
typeParameterNamePart: () => typeParameterNamePart,
|
|
151015
|
+
typeReferenceResolutionNameAndModeGetter: () => typeReferenceResolutionNameAndModeGetter,
|
|
150875
151016
|
typeToDisplayParts: () => typeToDisplayParts,
|
|
150876
151017
|
unchangedPollThresholds: () => unchangedPollThresholds,
|
|
150877
151018
|
unchangedTextChangeRange: () => unchangedTextChangeRange,
|
|
@@ -150987,6 +151128,7 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
150987
151128
|
updatePropertyAssignment: () => updatePropertyAssignment,
|
|
150988
151129
|
updatePropertySignature: () => updatePropertySignature,
|
|
150989
151130
|
updateQualifiedName: () => updateQualifiedName,
|
|
151131
|
+
updateResolutionField: () => updateResolutionField,
|
|
150990
151132
|
updateRestTypeNode: () => updateRestTypeNode,
|
|
150991
151133
|
updateReturn: () => updateReturn,
|
|
150992
151134
|
updateSetAccessor: () => updateSetAccessor,
|