diff --git a/src/harness/harness.ts b/src/harness/harness.ts index ca179d1e54..e2f3f971da 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -934,17 +934,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 }[],