From d66e70a96056f9b5c88e51012b6ade6b310c554e Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 2 Feb 2015 15:28:23 -0800 Subject: [PATCH] Emit even in the presence of parse errors. --- src/compiler/program.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index cf65d3c053e..a2a735bc1d8 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -114,8 +114,11 @@ module ts { } function isEmitBlocked(sourceFile?: SourceFile): boolean { - return getDiagnostics(sourceFile).length !== 0 || - (options.noEmitOnError && getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile).length !== 0); + if (options.noEmitOnError) { + return getDiagnostics(sourceFile).length !== 0 || getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile).length !== 0; + } + + return false; } function getDiagnosticsProducingTypeChecker() {