From 6744b1929768d783ef72ee7a32c86d5642803689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hua=CC=81ng=20Ju=CC=80nlia=CC=80ng?= Date: Wed, 15 Aug 2018 17:09:55 +0800 Subject: [PATCH] refactor(compiler): typo (#25496) PR Close #25496 --- packages/compiler-cli/src/perform_watch.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/compiler-cli/src/perform_watch.ts b/packages/compiler-cli/src/perform_watch.ts index b2b7e2faa5..d070e729b2 100644 --- a/packages/compiler-cli/src/perform_watch.ts +++ b/packages/compiler-cli/src/perform_watch.ts @@ -113,7 +113,7 @@ export function performWatchCompilation(host: PerformWatchHost): let cachedOptions: ParsedConfiguration|undefined; // CompilerOptions cached from last compilation let timerHandleForRecompilation: any; // Handle for 0.25s wait timer to trigger recompilation - const ingoreFilesForWatch = new Set(); + const ignoreFilesForWatch = new Set(); const fileCache = new Map(); const firstCompileResult = doCompilation(); @@ -162,7 +162,7 @@ export function performWatchCompilation(host: PerformWatchHost): cachedCompilerHost.writeFile = function( fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles: ReadonlyArray = []) { - ingoreFilesForWatch.add(path.normalize(fileName)); + ignoreFilesForWatch.add(path.normalize(fileName)); return originalWriteFileCallback(fileName, data, writeByteOrderMark, onError, sourceFiles); }; const originalFileExists = cachedCompilerHost.fileExists; @@ -191,7 +191,7 @@ export function performWatchCompilation(host: PerformWatchHost): return ce.content !; }; } - ingoreFilesForWatch.clear(); + ignoreFilesForWatch.clear(); const oldProgram = cachedProgram; // We clear out the `cachedProgram` here as a // program can only be used as `oldProgram` 1x @@ -253,7 +253,7 @@ export function performWatchCompilation(host: PerformWatchHost): fileCache.delete(path.normalize(fileName)); } - if (!ingoreFilesForWatch.has(path.normalize(fileName))) { + if (!ignoreFilesForWatch.has(path.normalize(fileName))) { // Ignore the file if the file is one that was written by the compiler. startTimerForRecompilation(); }