mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-26 10:43:51 -05:00
Clarify 'emitAll'.
This commit is contained in:
@@ -940,17 +940,19 @@ module Harness {
|
||||
}
|
||||
|
||||
public emitAll(ioHost?: IEmitterIOHost) {
|
||||
this.compileFiles(this.inputFiles, [],(result) => {
|
||||
result.files.forEach(file => {
|
||||
ioHost.writeFile(file.fileName, file.code, false);
|
||||
});
|
||||
result.declFilesCode.forEach(file => {
|
||||
ioHost.writeFile(file.fileName, file.code, false);
|
||||
});
|
||||
result.sourceMaps.forEach(file => {
|
||||
ioHost.writeFile(file.fileName, file.code, false);
|
||||
});
|
||||
},() => { }, this.compileOptions);
|
||||
this.compileFiles(this.inputFiles,
|
||||
/*otherFiles*/ [],
|
||||
/*onComplete*/ (result) => {
|
||||
result.files.forEach(writeFile);
|
||||
result.declFilesCode.forEach(writeFile);
|
||||
result.sourceMaps.forEach(writeFile);
|
||||
},
|
||||
/*settingsCallback*/ () => { },
|
||||
this.compileOptions);
|
||||
|
||||
function writeFile(file: GeneratedFile) {
|
||||
ioHost.writeFile(file.fileName, file.code, false);
|
||||
}
|
||||
}
|
||||
|
||||
public compileFiles(inputFiles: { unitName: string; content: string }[],
|
||||
|
||||
Reference in New Issue
Block a user