Skip to content

Commit 9141bfc

Browse files
Merge pull request #2470 from Microsoft/noEmitOnDeclarationErrors
Revert "Emit, even in the presence of declaration errors and noEmitOnError
2 parents 8e2b7d0 + af6d1eb commit 9141bfc

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)