Merge pull request #24890 from Microsoft/reuseProjectReferences

Reuse resolvedProjectReferences
This commit is contained in:
Ron Buckton 2018-06-11 18:49:35 -07:00 committed by GitHub
commit 5256e4a2f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -616,7 +616,7 @@ namespace ts {
const filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? createMap<SourceFile>() : undefined;
// A parallel array to projectReferences storing the results of reading in the referenced tsconfig files
const resolvedProjectReferences: (ResolvedProjectReference | undefined)[] | undefined = projectReferences ? [] : undefined;
let resolvedProjectReferences: (ResolvedProjectReference | undefined)[] | undefined = projectReferences ? [] : undefined;
const projectReferenceRedirects: Map<string> = createMap();
const shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options);
@ -1190,6 +1190,7 @@ namespace ts {
fileProcessingDiagnostics.reattachFileDiagnostics(modifiedFile.newFile);
}
resolvedTypeReferenceDirectives = oldProgram.getResolvedTypeReferenceDirectives();
resolvedProjectReferences = oldProgram.getProjectReferences();
sourceFileToPackageName = oldProgram.sourceFileToPackageName;
redirectTargetsSet = oldProgram.redirectTargetsSet;