mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Handle the fact that noResolveResolution resolution is reused
Fixes #39795
This commit is contained in:
parent
1763b8e5f2
commit
eeea32be29
@ -406,7 +406,7 @@ namespace ts {
|
||||
perDirectoryResolution.set(name, resolution);
|
||||
}
|
||||
resolutionsInFile.set(name, resolution);
|
||||
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, noResolveResolution);
|
||||
watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName);
|
||||
if (existingResolution) {
|
||||
stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName);
|
||||
}
|
||||
@ -561,7 +561,6 @@ namespace ts {
|
||||
resolution: T,
|
||||
filePath: Path,
|
||||
getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName<T, R>,
|
||||
noResolveResolution: T
|
||||
) {
|
||||
if (resolution.refCount) {
|
||||
resolution.refCount++;
|
||||
@ -569,7 +568,7 @@ namespace ts {
|
||||
}
|
||||
else {
|
||||
resolution.refCount = 1;
|
||||
Debug.assert(resolution.files === undefined || (resolution === noResolveResolution && length(noResolveResolution.files) === 0));
|
||||
Debug.assert(length(resolution.files) === 0); // This resolution shouldnt be referenced by any file yet
|
||||
if (isExternalModuleNameRelative(name)) {
|
||||
watchFailedLookupLocationOfResolution(resolution);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user