Skip to content

Commit

Permalink
fix 31012 allow noEmitOnError with isolatedModules
Browse files Browse the repository at this point in the history
fix microsoft#31012

Since the purpose of isolatedModules: true is to
do extra validation to ensure that separate
compilation is safe

Allowing emit in the presence of errors is
compatible with that intention.

Signed-off-by: Max Heiber <max.heiber@gmail.com>
  • Loading branch information
mheiber committed Apr 19, 2019
1 parent 2eea216 commit cc8f5a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
4 changes: 0 additions & 4 deletions src/compiler/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2707,10 +2707,6 @@ namespace ts {
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, getEmitDeclarationOptionName(options), "isolatedModules");
}

if (options.noEmitOnError) {
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmitOnError", "isolatedModules");
}

if (options.out) {
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "out", "isolatedModules");
}
Expand Down

This file was deleted.

5 changes: 5 additions & 0 deletions tests/baselines/reference/isolatedModulesNoEmitOnError.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//// [file1.ts]
export var x;

//// [file1.js]
export var x;

0 comments on commit cc8f5a6

Please sign in to comment.