Skip to content

Commit 42484b5

Browse files
committed
Use DirectoryStructureHost for fileExists and readFile
1 parent 69abc12 commit 42484b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/program.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3121,12 +3121,12 @@ namespace ts {
31213121
/* @internal */
31223122
export function parseConfigHostFromCompilerHostLike(host: CompilerHostLike, directoryStructureHost: DirectoryStructureHost = host): ParseConfigFileHost {
31233123
return {
3124-
fileExists: f => host.fileExists(f),
3124+
fileExists: f => directoryStructureHost.fileExists(f),
31253125
readDirectory(root, extensions, excludes, includes, depth) {
31263126
Debug.assertDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'");
31273127
return directoryStructureHost.readDirectory!(root, extensions, excludes, includes, depth);
31283128
},
3129-
readFile: f => host.readFile(f),
3129+
readFile: f => directoryStructureHost.readFile(f),
31303130
useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(),
31313131
getCurrentDirectory: () => host.getCurrentDirectory(),
31323132
onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || (() => undefined),

0 commit comments

Comments
 (0)