File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -301,7 +301,6 @@ namespace ts.server {
301
301
let shouldRefreshInferredProjects = false ;
302
302
for ( const p of projects ) {
303
303
if ( ! p . updateGraph ( ) ) {
304
- this . typingsCache . invalidateCachedTypingsForProject ( p ) ;
305
304
shouldRefreshInferredProjects = true ;
306
305
}
307
306
}
Original file line number Diff line number Diff line change @@ -312,6 +312,7 @@ namespace ts.server {
312
312
// - newProgram is different from the old program and structure of the old program was not reused.
313
313
if ( ! oldProgram || ( this . program !== oldProgram && ! oldProgram . structureIsReused ) ) {
314
314
hasChanges = true ;
315
+ this . projectService . typingsCache . invalidateCachedTypingsForProject ( this ) ;
315
316
if ( oldProgram ) {
316
317
for ( const f of oldProgram . getSourceFiles ( ) ) {
317
318
if ( this . program . getSourceFileByPath ( f . path ) ) {
@@ -414,9 +415,6 @@ namespace ts.server {
414
415
removed . push ( id ) ;
415
416
}
416
417
}
417
- if ( added . length > 0 || removed . length > 0 ) {
418
- this . projectService . typingsCache . invalidateCachedTypingsForProject ( this ) ;
419
- }
420
418
this . lastReportedFileNames = currentFiles ;
421
419
422
420
this . lastReportedFileNames = currentFiles ;
You can’t perform that action at this time.
0 commit comments