diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 4f62cfdfe2d91..12a1b09af546c 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -747,6 +747,10 @@ namespace ts { function fileChanged(curr: any, prev: any) { if (+curr.mtime === 0) { + if (eventKind === FileWatcherEventKind.Deleted) { + // Already deleted file, no need to callback again + return; + } eventKind = FileWatcherEventKind.Deleted; } // previous event kind check is to ensure we send created event when file is restored or renamed twice (that is it disappears and reappears)