mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Move invalidate typings cache to UpdateGraphWorker
This commit is contained in:
parent
6ea624a2fe
commit
456227bbee
@ -301,7 +301,6 @@ namespace ts.server {
|
||||
let shouldRefreshInferredProjects = false;
|
||||
for (const p of projects) {
|
||||
if (!p.updateGraph()) {
|
||||
this.typingsCache.invalidateCachedTypingsForProject(p);
|
||||
shouldRefreshInferredProjects = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -312,6 +312,7 @@ namespace ts.server {
|
||||
// - newProgram is different from the old program and structure of the old program was not reused.
|
||||
if (!oldProgram || (this.program !== oldProgram && !oldProgram.structureIsReused)) {
|
||||
hasChanges = true;
|
||||
this.projectService.typingsCache.invalidateCachedTypingsForProject(this);
|
||||
if (oldProgram) {
|
||||
for (const f of oldProgram.getSourceFiles()) {
|
||||
if (this.program.getSourceFileByPath(f.path)) {
|
||||
@ -414,9 +415,6 @@ namespace ts.server {
|
||||
removed.push(id);
|
||||
}
|
||||
}
|
||||
if (added.length > 0 || removed.length > 0) {
|
||||
this.projectService.typingsCache.invalidateCachedTypingsForProject(this);
|
||||
}
|
||||
this.lastReportedFileNames = currentFiles;
|
||||
|
||||
this.lastReportedFileNames = currentFiles;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user