Skip to content

Commit c7f8959

Browse files
committed
PR feedback.
1 parent 6a37fd4 commit c7f8959

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/compiler/program.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ namespace ts {
8383
let text: string | undefined;
8484
try {
8585
performance.mark("beforeIORead");
86-
text = host.readFile(fileName);
86+
text = compilerHost.readFile(fileName);
8787
performance.mark("afterIORead");
8888
performance.measure("I/O Read", "beforeIORead", "afterIORead");
8989
}
@@ -112,8 +112,8 @@ namespace ts {
112112
if (directoryPath.length > getRootLength(directoryPath) && !directoryExists(directoryPath)) {
113113
const parentDirectory = getDirectoryPath(directoryPath);
114114
ensureDirectoriesExist(parentDirectory);
115-
if (host.createDirectory) {
116-
host.createDirectory(directoryPath);
115+
if (compilerHost.createDirectory) {
116+
compilerHost.createDirectory(directoryPath);
117117
}
118118
else {
119119
system.createDirectory(directoryPath);
@@ -181,7 +181,7 @@ namespace ts {
181181

182182
const newLine = getNewLineCharacter(options, () => system.newLine);
183183
const realpath = system.realpath && ((path: string) => system.realpath!(path));
184-
const host: CompilerHost = {
184+
const compilerHost: CompilerHost = {
185185
getSourceFile,
186186
getDefaultLibLocation,
187187
getDefaultLibFileName: options => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options)),
@@ -200,7 +200,7 @@ namespace ts {
200200
readDirectory: (path, extensions, include, exclude, depth) => system.readDirectory(path, extensions, include, exclude, depth),
201201
createDirectory: d => system.createDirectory(d)
202202
};
203-
return host;
203+
return compilerHost;
204204
}
205205

206206
export function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): ReadonlyArray<Diagnostic> {

src/compiler/tsbuild.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ namespace ts {
12301230
return sourceFile;
12311231
};
12321232

1233-
// fileExits for any kind of extension
1233+
// fileExists for any kind of extension
12341234
host.fileExists = fileName => {
12351235
const key = toPath(fileName);
12361236
const value = fileExistsCache.get(key);

src/compiler/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5015,7 +5015,7 @@ namespace ts {
50155015
/* @internal */ hasChangedAutomaticTypeDirectiveNames?: boolean;
50165016
createHash?(data: string): string;
50175017

5018-
// TODO: later handle this in better way in builder host instead once the ap
5018+
// TODO: later handle this in better way in builder host instead once the api for tsbuild finalizes and doesnt use compilerHost as base
50195019
/*@internal*/createDirectory?(directory: string): void;
50205020
}
50215021

0 commit comments

Comments
 (0)