Skip to content

Commit d66e70a

Browse files
Emit even in the presence of parse errors.
1 parent 5343336 commit d66e70a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/compiler/program.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,11 @@ module ts {
114114
}
115115

116116
function isEmitBlocked(sourceFile?: SourceFile): boolean {
117-
return getDiagnostics(sourceFile).length !== 0 ||
118-
(options.noEmitOnError && getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile).length !== 0);
117+
if (options.noEmitOnError) {
118+
return getDiagnostics(sourceFile).length !== 0 || getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile).length !== 0;
119+
}
120+
121+
return false;
119122
}
120123

121124
function getDiagnosticsProducingTypeChecker() {

0 commit comments

Comments
 (0)