@@ -171,7 +171,7 @@ module ts {
171
171
getDiagnosticsProducingTypeChecker,
172
172
getCommonSourceDirectory : ( ) => commonSourceDirectory ,
173
173
emit,
174
- getCurrentDirectory : host . getCurrentDirectory ,
174
+ getCurrentDirectory : ( ) => host . getCurrentDirectory ( ) ,
175
175
getNodeCount : ( ) => getDiagnosticsProducingTypeChecker ( ) . getNodeCount ( ) ,
176
176
getIdentifierCount : ( ) => getDiagnosticsProducingTypeChecker ( ) . getIdentifierCount ( ) ,
177
177
getSymbolCount : ( ) => getDiagnosticsProducingTypeChecker ( ) . getSymbolCount ( ) ,
@@ -181,14 +181,15 @@ module ts {
181
181
182
182
function getEmitHost ( writeFileCallback ?: WriteFileCallback ) : EmitHost {
183
183
return {
184
- getCanonicalFileName : host . getCanonicalFileName ,
184
+ getCanonicalFileName : fileName => host . getCanonicalFileName ( fileName ) ,
185
185
getCommonSourceDirectory : program . getCommonSourceDirectory ,
186
186
getCompilerOptions : program . getCompilerOptions ,
187
- getCurrentDirectory : host . getCurrentDirectory ,
188
- getNewLine : host . getNewLine ,
187
+ getCurrentDirectory : ( ) => host . getCurrentDirectory ( ) ,
188
+ getNewLine : ( ) => host . getNewLine ( ) ,
189
189
getSourceFile : program . getSourceFile ,
190
190
getSourceFiles : program . getSourceFiles ,
191
- writeFile : writeFileCallback || host . writeFile ,
191
+ writeFile : writeFileCallback || (
192
+ ( fileName , data , writeByteOrderMark , onError ) => host . writeFile ( fileName , data , writeByteOrderMark , onError ) ) ,
192
193
} ;
193
194
}
194
195
0 commit comments