@@ -171,7 +171,7 @@ module ts {
171171 getDiagnosticsProducingTypeChecker,
172172 getCommonSourceDirectory : ( ) => commonSourceDirectory ,
173173 emit,
174- getCurrentDirectory : host . getCurrentDirectory ,
174+ getCurrentDirectory : ( ) => host . getCurrentDirectory ( ) ,
175175 getNodeCount : ( ) => getDiagnosticsProducingTypeChecker ( ) . getNodeCount ( ) ,
176176 getIdentifierCount : ( ) => getDiagnosticsProducingTypeChecker ( ) . getIdentifierCount ( ) ,
177177 getSymbolCount : ( ) => getDiagnosticsProducingTypeChecker ( ) . getSymbolCount ( ) ,
@@ -181,14 +181,15 @@ module ts {
181181
182182 function getEmitHost ( writeFileCallback ?: WriteFileCallback ) : EmitHost {
183183 return {
184- getCanonicalFileName : host . getCanonicalFileName ,
184+ getCanonicalFileName : fileName => host . getCanonicalFileName ( fileName ) ,
185185 getCommonSourceDirectory : program . getCommonSourceDirectory ,
186186 getCompilerOptions : program . getCompilerOptions ,
187- getCurrentDirectory : host . getCurrentDirectory ,
188- getNewLine : host . getNewLine ,
187+ getCurrentDirectory : ( ) => host . getCurrentDirectory ( ) ,
188+ getNewLine : ( ) => host . getNewLine ( ) ,
189189 getSourceFile : program . getSourceFile ,
190190 getSourceFiles : program . getSourceFiles ,
191- writeFile : writeFileCallback || host . writeFile ,
191+ writeFile : writeFileCallback || (
192+ ( fileName , data , writeByteOrderMark , onError ) => host . writeFile ( fileName , data , writeByteOrderMark , onError ) ) ,
192193 } ;
193194 }
194195
0 commit comments