diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index ff09efb05ea..6e0384219a1 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -716,7 +716,7 @@ namespace ts { } // prevent saving an open file from over-eagerly triggering invalidation if (resolutionHost.fileIsOpen(fileOrDirectoryPath)) { - return; + return false; } // Ignore emits from the program if (isEmittedFileOfProgram(resolutionHost.getCurrentProgram(), fileOrDirectoryPath)) { diff --git a/src/compiler/watch.ts b/src/compiler/watch.ts index 0faf9f0c175..dbc78fa5d4e 100644 --- a/src/compiler/watch.ts +++ b/src/compiler/watch.ts @@ -691,7 +691,7 @@ namespace ts { hasChangedAutomaticTypeDirectiveNames = true; scheduleProgramUpdate(); }; - compilerHost.fileIsOpen = () => false; + compilerHost.fileIsOpen = returnFalse; compilerHost.maxNumberOfFilesToIterateForInvalidation = host.maxNumberOfFilesToIterateForInvalidation; compilerHost.getCurrentProgram = getCurrentProgram; compilerHost.writeLog = writeLog;