Skip to content

Commit 49a9d64

Browse files
committed
Merge pull request microsoft#7139 from Microsoft/revertBreakingChange
Rever change to EmitOutput.diagnostics
2 parents 8a050ea + 353998a commit 49a9d64

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

src/compiler/emitter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
389389

390390
return {
391391
emitSkipped,
392-
declarationDiagnostics: emitterDiagnostics.getDiagnostics(),
392+
diagnostics: emitterDiagnostics.getDiagnostics(),
393393
sourceMaps: sourceMapDataList
394394
};
395395

src/compiler/program.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ namespace ts {
956956
let declarationDiagnostics: Diagnostic[] = [];
957957

958958
if (options.noEmit) {
959-
return { declarationDiagnostics, sourceMaps: undefined, emitSkipped: true };
959+
return { diagnostics: declarationDiagnostics, sourceMaps: undefined, emitSkipped: true };
960960
}
961961

962962
// If the noEmitOnError flag is set, then check if we have any errors so far. If so,
@@ -973,7 +973,7 @@ namespace ts {
973973
}
974974

975975
if (diagnostics.length > 0 || declarationDiagnostics.length > 0) {
976-
return { declarationDiagnostics, sourceMaps: undefined, emitSkipped: true };
976+
return { diagnostics, sourceMaps: undefined, emitSkipped: true };
977977
}
978978
}
979979

src/compiler/tsc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ namespace ts {
592592

593593
// Otherwise, emit and report any errors we ran into.
594594
const emitOutput = program.emit();
595-
diagnostics = diagnostics.concat(emitOutput.declarationDiagnostics);
595+
diagnostics = diagnostics.concat(emitOutput.diagnostics);
596596

597597
reportDiagnostics(sortAndDeduplicateDiagnostics(diagnostics), compilerHost);
598598

src/compiler/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,8 @@ namespace ts {
16801680

16811681
export interface EmitResult {
16821682
emitSkipped: boolean;
1683-
/* @internal */ declarationDiagnostics: Diagnostic[];
1683+
/** Contains declaration emit diagnostics */
1684+
diagnostics: Diagnostic[];
16841685
/* @internal */ sourceMaps: SourceMapData[]; // Array of sourceMapData if compiler emitted sourcemaps
16851686
}
16861687

src/harness/projectsRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class ProjectRunner extends RunnerBase {
127127
let errors = ts.getPreEmitDiagnostics(program);
128128

129129
const emitResult = program.emit();
130-
errors = ts.concatenate(errors, emitResult.declarationDiagnostics);
130+
errors = ts.concatenate(errors, emitResult.diagnostics);
131131
const sourceMapData = emitResult.sourceMaps;
132132

133133
// Clean up source map data that will be used in baselining

0 commit comments

Comments
 (0)