@@ -149,7 +149,7 @@ module ts {
149
149
getDiagnosticsProducingTypeChecker,
150
150
getCommonSourceDirectory : ( ) => commonSourceDirectory ,
151
151
emit,
152
- getCurrentDirectory : host . getCurrentDirectory ,
152
+ getCurrentDirectory : ( ) => host . getCurrentDirectory ( ) ,
153
153
getNodeCount : ( ) => getDiagnosticsProducingTypeChecker ( ) . getNodeCount ( ) ,
154
154
getIdentifierCount : ( ) => getDiagnosticsProducingTypeChecker ( ) . getIdentifierCount ( ) ,
155
155
getSymbolCount : ( ) => getDiagnosticsProducingTypeChecker ( ) . getSymbolCount ( ) ,
@@ -159,14 +159,15 @@ module ts {
159
159
160
160
function getEmitHost ( writeFileCallback ?: WriteFileCallback ) : EmitHost {
161
161
return {
162
- getCanonicalFileName : host . getCanonicalFileName ,
162
+ getCanonicalFileName : fileName => host . getCanonicalFileName ( fileName ) ,
163
163
getCommonSourceDirectory : program . getCommonSourceDirectory ,
164
164
getCompilerOptions : program . getCompilerOptions ,
165
- getCurrentDirectory : host . getCurrentDirectory ,
166
- getNewLine : host . getNewLine ,
165
+ getCurrentDirectory : ( ) => host . getCurrentDirectory ( ) ,
166
+ getNewLine : ( ) => host . getNewLine ( ) ,
167
167
getSourceFile : program . getSourceFile ,
168
168
getSourceFiles : program . getSourceFiles ,
169
- writeFile : writeFileCallback || host . writeFile ,
169
+ writeFile : writeFileCallback || (
170
+ ( fileName , data , writeByteOrderMark , onError ) => host . writeFile ( fileName , data , writeByteOrderMark , onError ) ) ,
170
171
} ;
171
172
}
172
173
0 commit comments