@@ -745,7 +745,6 @@ export function createWatchFactory<Y = undefined>(host: WatchFactoryHost & { tra
745745/** @internal */
746746export function createCompilerHostFromProgramHost ( host : ProgramHost < any > , getCompilerOptions : ( ) => CompilerOptions , directoryStructureHost : DirectoryStructureHost = host ) : CompilerHost {
747747 const useCaseSensitiveFileNames = host . useCaseSensitiveFileNames ( ) ;
748- const hostGetNewLine = memoize ( ( ) => host . getNewLine ( ) ) ;
749748 const compilerHost : CompilerHost = {
750749 getSourceFile : createGetSourceFile (
751750 ( fileName , encoding ) => ! encoding ? compilerHost . readFile ( fileName ) : host . readFile ( fileName , encoding ) ,
@@ -762,7 +761,7 @@ export function createCompilerHostFromProgramHost(host: ProgramHost<any>, getCom
762761 getCurrentDirectory : memoize ( ( ) => host . getCurrentDirectory ( ) ) ,
763762 useCaseSensitiveFileNames : ( ) => useCaseSensitiveFileNames ,
764763 getCanonicalFileName : createGetCanonicalFileName ( useCaseSensitiveFileNames ) ,
765- getNewLine : ( ) => getNewLineCharacter ( getCompilerOptions ( ) , hostGetNewLine ) ,
764+ getNewLine : ( ) => getNewLineCharacter ( getCompilerOptions ( ) ) ,
766765 fileExists : f => host . fileExists ( f ) ,
767766 readFile : f => host . readFile ( f ) ,
768767 trace : maybeBind ( host , host . trace ) ,
@@ -867,7 +866,7 @@ function createWatchCompilerHost<T extends BuilderProgram = EmitAndSemanticDiagn
867866 copyProperties ( result , createWatchHost ( system , reportWatchStatus ) ) ;
868867 result . afterProgramCreate = builderProgram => {
869868 const compilerOptions = builderProgram . getCompilerOptions ( ) ;
870- const newLine = getNewLineCharacter ( compilerOptions , ( ) => system . newLine ) ;
869+ const newLine = getNewLineCharacter ( compilerOptions ) ;
871870
872871 emitFilesAndReportErrors (
873872 builderProgram ,
0 commit comments