File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -381,7 +381,8 @@ namespace ts {
381381 const filePath = typeof relativeFileName !== "string"
382382 ? undefined
383383 : toPath ( relativeFileName , baseDirPath , createGetCanonicalFileName ( sys . useCaseSensitiveFileNames ) ) ;
384- if ( eventName === "change" && fileWatcherCallbacks . contains ( filePath ) ) {
384+ // Some applications save a working file via rename operations
385+ if ( ( eventName === "change" || eventName === "rename" ) && fileWatcherCallbacks . contains ( filePath ) ) {
385386 for ( const fileCallback of fileWatcherCallbacks . get ( filePath ) ) {
386387 fileCallback ( filePath ) ;
387388 }
Original file line number Diff line number Diff line change @@ -486,7 +486,7 @@ namespace ts {
486486 }
487487
488488 function watchedDirectoryChanged ( fileName : string ) {
489- if ( fileName && ! ts . isSupportedSourceFileName ( fileName , commandLine . options ) ) {
489+ if ( fileName && ! ts . isSupportedSourceFileName ( fileName , compilerOptions ) ) {
490490 return ;
491491 }
492492
You can’t perform that action at this time.
0 commit comments