Rever change to EmitOutput.diagnostics
This commit is contained in:
parent
8a050ea18d
commit
353998a6bd
|
@ -389,7 +389,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||
|
||||
return {
|
||||
emitSkipped,
|
||||
declarationDiagnostics: emitterDiagnostics.getDiagnostics(),
|
||||
diagnostics: emitterDiagnostics.getDiagnostics(),
|
||||
sourceMaps: sourceMapDataList
|
||||
};
|
||||
|
||||
|
|
|
@ -956,7 +956,7 @@ namespace ts {
|
|||
let declarationDiagnostics: Diagnostic[] = [];
|
||||
|
||||
if (options.noEmit) {
|
||||
return { declarationDiagnostics, sourceMaps: undefined, emitSkipped: true };
|
||||
return { diagnostics: declarationDiagnostics, sourceMaps: undefined, emitSkipped: true };
|
||||
}
|
||||
|
||||
// If the noEmitOnError flag is set, then check if we have any errors so far. If so,
|
||||
|
@ -973,7 +973,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
if (diagnostics.length > 0 || declarationDiagnostics.length > 0) {
|
||||
return { declarationDiagnostics, sourceMaps: undefined, emitSkipped: true };
|
||||
return { diagnostics, sourceMaps: undefined, emitSkipped: true };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -592,7 +592,7 @@ namespace ts {
|
|||
|
||||
// Otherwise, emit and report any errors we ran into.
|
||||
const emitOutput = program.emit();
|
||||
diagnostics = diagnostics.concat(emitOutput.declarationDiagnostics);
|
||||
diagnostics = diagnostics.concat(emitOutput.diagnostics);
|
||||
|
||||
reportDiagnostics(sortAndDeduplicateDiagnostics(diagnostics), compilerHost);
|
||||
|
||||
|
|
|
@ -1680,7 +1680,8 @@ namespace ts {
|
|||
|
||||
export interface EmitResult {
|
||||
emitSkipped: boolean;
|
||||
/* @internal */ declarationDiagnostics: Diagnostic[];
|
||||
/** Contains declaration emit diagnostics */
|
||||
diagnostics: Diagnostic[];
|
||||
/* @internal */ sourceMaps: SourceMapData[]; // Array of sourceMapData if compiler emitted sourcemaps
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ class ProjectRunner extends RunnerBase {
|
|||
let errors = ts.getPreEmitDiagnostics(program);
|
||||
|
||||
const emitResult = program.emit();
|
||||
errors = ts.concatenate(errors, emitResult.declarationDiagnostics);
|
||||
errors = ts.concatenate(errors, emitResult.diagnostics);
|
||||
const sourceMapData = emitResult.sourceMaps;
|
||||
|
||||
// Clean up source map data that will be used in baselining
|
||||
|
|
Loading…
Reference in a new issue