diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index d2c96a11774..f08082d72c8 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -389,7 +389,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge return { emitSkipped, - declarationDiagnostics: emitterDiagnostics.getDiagnostics(), + diagnostics: emitterDiagnostics.getDiagnostics(), sourceMaps: sourceMapDataList }; diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 2b1a38d2084..d41f34df0b3 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -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 }; } } diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 59212ed849b..8e08091bc77 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -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); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index e8fca86c4b2..58a151a2bc0 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -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 } diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index b8280ed24b9..96fcfedc6b4 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -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