Clarify 'emitAll'.

This commit is contained in:
Daniel Rosenwasser 2015-06-10 12:52:06 -07:00
parent f98d578a20
commit 40081d6e98

View file

@ -934,17 +934,19 @@ module Harness {
} }
public emitAll(ioHost?: IEmitterIOHost) { public emitAll(ioHost?: IEmitterIOHost) {
this.compileFiles(this.inputFiles, [],(result) => { this.compileFiles(this.inputFiles,
result.files.forEach(file => { /*otherFiles*/ [],
ioHost.writeFile(file.fileName, file.code, false); /*onComplete*/ (result) => {
}); result.files.forEach(writeFile);
result.declFilesCode.forEach(file => { result.declFilesCode.forEach(writeFile);
ioHost.writeFile(file.fileName, file.code, false); result.sourceMaps.forEach(writeFile);
}); },
result.sourceMaps.forEach(file => { /*settingsCallback*/ () => { },
ioHost.writeFile(file.fileName, file.code, false); this.compileOptions);
});
},() => { }, this.compileOptions); function writeFile(file: GeneratedFile) {
ioHost.writeFile(file.fileName, file.code, false);
}
} }
public compileFiles(inputFiles: { unitName: string; content: string }[], public compileFiles(inputFiles: { unitName: string; content: string }[],