@@ -149,7 +149,7 @@ module ts {
149149 getDiagnosticsProducingTypeChecker,
150150 getCommonSourceDirectory : ( ) => commonSourceDirectory ,
151151 emit,
152- getCurrentDirectory : host . getCurrentDirectory ,
152+ getCurrentDirectory : ( ) => host . getCurrentDirectory ( ) ,
153153 getNodeCount : ( ) => getDiagnosticsProducingTypeChecker ( ) . getNodeCount ( ) ,
154154 getIdentifierCount : ( ) => getDiagnosticsProducingTypeChecker ( ) . getIdentifierCount ( ) ,
155155 getSymbolCount : ( ) => getDiagnosticsProducingTypeChecker ( ) . getSymbolCount ( ) ,
@@ -159,14 +159,15 @@ module ts {
159159
160160 function getEmitHost ( writeFileCallback ?: WriteFileCallback ) : EmitHost {
161161 return {
162- getCanonicalFileName : host . getCanonicalFileName ,
162+ getCanonicalFileName : fileName => host . getCanonicalFileName ( fileName ) ,
163163 getCommonSourceDirectory : program . getCommonSourceDirectory ,
164164 getCompilerOptions : program . getCompilerOptions ,
165- getCurrentDirectory : host . getCurrentDirectory ,
166- getNewLine : host . getNewLine ,
165+ getCurrentDirectory : ( ) => host . getCurrentDirectory ( ) ,
166+ getNewLine : ( ) => host . getNewLine ( ) ,
167167 getSourceFile : program . getSourceFile ,
168168 getSourceFiles : program . getSourceFiles ,
169- writeFile : writeFileCallback || host . writeFile ,
169+ writeFile : writeFileCallback || (
170+ ( fileName , data , writeByteOrderMark , onError ) => host . writeFile ( fileName , data , writeByteOrderMark , onError ) ) ,
170171 } ;
171172 }
172173
0 commit comments