mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Simplify the API for emitting code from the Program instance.
This commit is contained in:
@@ -2216,7 +2216,7 @@ module FourSlash {
|
||||
if (errors.length > 0) {
|
||||
throw new Error('Error compiling ' + fileName + ': ' + errors.map(e => e.messageText).join('\r\n'));
|
||||
}
|
||||
program.emitFiles();
|
||||
program.emit();
|
||||
result = result || ''; // Might have an empty fourslash file
|
||||
|
||||
// Compile and execute the test
|
||||
|
||||
@@ -1086,7 +1086,7 @@ module Harness {
|
||||
// only emit if there weren't parse errors
|
||||
var emitResult: ts.EmitResult;
|
||||
if (!isEmitBlocked) {
|
||||
emitResult = program.emitFiles();
|
||||
emitResult = program.emit();
|
||||
}
|
||||
|
||||
var errors: HarnessDiagnostic[] = [];
|
||||
|
||||
@@ -131,7 +131,7 @@ class ProjectRunner extends RunnerBase {
|
||||
var sourceMapData: ts.SourceMapData[] = null;
|
||||
if (!errors.length) {
|
||||
errors = program.getTypeCheckerDiagnostics();
|
||||
var emitResult = program.emitFiles();
|
||||
var emitResult = program.emit();
|
||||
errors = ts.concatenate(errors, emitResult.diagnostics);
|
||||
sourceMapData = emitResult.sourceMaps;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user