From 66018ea73e33a0bf707548bc6423ef72b8bca8a7 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 27 Dec 2018 10:36:18 -0800 Subject: [PATCH] Use DirectoryStructureHost for fileExists and readFile --- src/compiler/program.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 22b425d8252..fbe9a6c5089 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -3124,12 +3124,12 @@ namespace ts { /* @internal */ export function parseConfigHostFromCompilerHostLike(host: CompilerHostLike, directoryStructureHost: DirectoryStructureHost = host): ParseConfigFileHost { return { - fileExists: f => host.fileExists(f), + fileExists: f => directoryStructureHost.fileExists(f), readDirectory(root, extensions, excludes, includes, depth) { Debug.assertDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); return directoryStructureHost.readDirectory!(root, extensions, excludes, includes, depth); }, - readFile: f => host.readFile(f), + readFile: f => directoryStructureHost.readFile(f), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(), getCurrentDirectory: () => host.getCurrentDirectory(), onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || (() => undefined),