@@ -83,7 +83,7 @@ namespace ts {
83
83
let text : string | undefined ;
84
84
try {
85
85
performance . mark ( "beforeIORead" ) ;
86
- text = host . readFile ( fileName ) ;
86
+ text = compilerHost . readFile ( fileName ) ;
87
87
performance . mark ( "afterIORead" ) ;
88
88
performance . measure ( "I/O Read" , "beforeIORead" , "afterIORead" ) ;
89
89
}
@@ -112,8 +112,8 @@ namespace ts {
112
112
if ( directoryPath . length > getRootLength ( directoryPath ) && ! directoryExists ( directoryPath ) ) {
113
113
const parentDirectory = getDirectoryPath ( directoryPath ) ;
114
114
ensureDirectoriesExist ( parentDirectory ) ;
115
- if ( host . createDirectory ) {
116
- host . createDirectory ( directoryPath ) ;
115
+ if ( compilerHost . createDirectory ) {
116
+ compilerHost . createDirectory ( directoryPath ) ;
117
117
}
118
118
else {
119
119
system . createDirectory ( directoryPath ) ;
@@ -181,7 +181,7 @@ namespace ts {
181
181
182
182
const newLine = getNewLineCharacter ( options , ( ) => system . newLine ) ;
183
183
const realpath = system . realpath && ( ( path : string ) => system . realpath ! ( path ) ) ;
184
- const host : CompilerHost = {
184
+ const compilerHost : CompilerHost = {
185
185
getSourceFile,
186
186
getDefaultLibLocation,
187
187
getDefaultLibFileName : options => combinePaths ( getDefaultLibLocation ( ) , getDefaultLibFileName ( options ) ) ,
@@ -200,7 +200,7 @@ namespace ts {
200
200
readDirectory : ( path , extensions , include , exclude , depth ) => system . readDirectory ( path , extensions , include , exclude , depth ) ,
201
201
createDirectory : d => system . createDirectory ( d )
202
202
} ;
203
- return host ;
203
+ return compilerHost ;
204
204
}
205
205
206
206
export function getPreEmitDiagnostics ( program : Program , sourceFile ?: SourceFile , cancellationToken ?: CancellationToken ) : ReadonlyArray < Diagnostic > {
0 commit comments