From af6d1ebe012fabd5d6d4c46f1ea1d93558ab9275 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 23 Mar 2015 16:12:14 -0700 Subject: [PATCH] Revert "Emit, even in the presence of declaration errors and noEmitOnError." This reverts commit 19517ac0ddf8e7ed67ee1328f379071d8e8feb51. --- src/compiler/program.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index f902cb3b13a..a4c3a65f29c 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -87,6 +87,11 @@ module ts { export function getPreEmitDiagnostics(program: Program): Diagnostic[] { let diagnostics = program.getSyntacticDiagnostics().concat(program.getGlobalDiagnostics()).concat(program.getSemanticDiagnostics()); + + if (program.getCompilerOptions().declaration) { + diagnostics.concat(program.getDeclarationDiagnostics()); + } + return sortAndDeduplicateDiagnostics(diagnostics); }