Handle the fact that noResolveResolution resolution is reused (#39889)

Fixes #39795
This commit is contained in:
Sheetal Nandi
2020-08-04 13:33:27 -07:00
committed by GitHub
parent 6247364181
commit bcccae2fd4
2 changed files with 19 additions and 1 deletions

View File

@@ -568,7 +568,7 @@ namespace ts {
}
else {
resolution.refCount = 1;
Debug.assert(resolution.files === undefined);
Debug.assert(length(resolution.files) === 0); // This resolution shouldnt be referenced by any file yet
if (isExternalModuleNameRelative(name)) {
watchFailedLookupLocationOfResolution(resolution);
}