Skip to content

Commit af6d1eb

Browse files
Revert "Emit, even in the presence of declaration errors and noEmitOnError."
This reverts commit 19517ac.
1 parent 755d806 commit af6d1eb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/compiler/program.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ module ts {
8787

8888
export function getPreEmitDiagnostics(program: Program): Diagnostic[] {
8989
let diagnostics = program.getSyntacticDiagnostics().concat(program.getGlobalDiagnostics()).concat(program.getSemanticDiagnostics());
90+
91+
if (program.getCompilerOptions().declaration) {
92+
diagnostics.concat(program.getDeclarationDiagnostics());
93+
}
94+
9095
return sortAndDeduplicateDiagnostics(diagnostics);
9196
}
9297

0 commit comments

Comments
 (0)