From 191f4f63ab6693475b015945d321341ffae3820c Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Fri, 17 Jul 2020 07:02:05 -0700 Subject: [PATCH] Explicitly add dependency on node to compiler tsconfig, remove es6+ string method usage (#39636) --- src/compiler/resolutionCache.ts | 2 +- src/compiler/tsconfig.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 403675c24f9..56ea6a03e80 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -746,7 +746,7 @@ namespace ts { for (const containingFilePath of Debug.assertDefined(resolution.files)) { (filesWithInvalidatedResolutions || (filesWithInvalidatedResolutions = new Set())).add(containingFilePath); // When its a file with inferred types resolution, invalidate type reference directive resolution - hasChangedAutomaticTypeDirectiveNames = hasChangedAutomaticTypeDirectiveNames || containingFilePath.endsWith(inferredTypesContainingFile); + hasChangedAutomaticTypeDirectiveNames = hasChangedAutomaticTypeDirectiveNames || endsWith(containingFilePath, inferredTypesContainingFile); } } return invalidated; diff --git a/src/compiler/tsconfig.json b/src/compiler/tsconfig.json index 6b17c1b21d3..8213e019b34 100644 --- a/src/compiler/tsconfig.json +++ b/src/compiler/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../tsconfig-base", "compilerOptions": { - "outFile": "../../built/local/compiler.js" + "outFile": "../../built/local/compiler.js", + "types": ["node"] }, "references": [