Set old program build info as a location to look for from module resolution caches

This commit is contained in:
Sheetal Nandi
2022-12-09 14:49:25 -08:00
parent 207226a9c8
commit 591960edb0
20 changed files with 177 additions and 3046 deletions
+11
View File
@@ -142,6 +142,7 @@ import {
toPath,
tracing,
TypeAcquisition,
TypeReferenceDirectiveResolutionCache,
updateErrorForNoInputFiles,
updateMissingFilePathsWatch,
WatchDirectoryFlags,
@@ -684,6 +685,11 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
);
}
/** @internal */
getTypeReferenceDirectiveResolutionCache(): TypeReferenceDirectiveResolutionCache | undefined {
return this.resolutionCache.getTypeReferenceDirectiveResolutionCache();
}
directoryExists(path: string): boolean {
return this.directoryStructureHost.directoryExists!(path); // TODO: GH#18217
}
@@ -2519,6 +2525,11 @@ export class AutoImportProviderProject extends Project {
getModuleResolutionCache() {
return this.hostProject.getCurrentProgram()?.getModuleResolutionCache();
}
/** @internal */
getTypeReferenceDirectiveResolutionCache() {
return this.hostProject.getCurrentProgram()?.getTypeReferenceDirectiveResolutionCache();
}
}
/**