Simplify the API for emitting code from the Program instance.

This commit is contained in:
Cyrus Najmabadi
2015-02-04 16:53:14 -08:00
parent b6d083fa40
commit bb307f8163
19 changed files with 263 additions and 152 deletions

View File

@@ -4664,12 +4664,7 @@ module ts {
});
}
// Get an emit host from our program, but override the writeFile functionality to
// call our local writer function.
var emitHost = createEmitHostFromProgram(program);
emitHost.writeFile = writeFile;
var emitOutput = emitFiles(program.getEmitResolver(), emitHost, sourceFile);
var emitOutput = program.emit(sourceFile, writeFile);
return {
outputFiles,