diff --git a/src/compiler/program.ts b/src/compiler/program.ts index b051c0f5bcc..9c4de60a734 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -973,7 +973,11 @@ namespace ts { } if (diagnostics.length > 0 || declarationDiagnostics.length > 0) { - return { diagnostics, sourceMaps: undefined, emitSkipped: true }; + return { + diagnostics: concatenate(diagnostics, declarationDiagnostics), + sourceMaps: undefined, + emitSkipped: true + }; } }