Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
error TS5053: Option 'noEmitOnError' cannot be specified with option 'isolatedModules'.
tests/cases/compiler/file1.ts(1,14): error TS2322: Type '3' is not assignable to type 'string'.


!!! error TS5053: Option 'noEmitOnError' cannot be specified with option 'isolatedModules'.
==== tests/cases/compiler/file1.ts (0 errors) ====
export var x;
==== tests/cases/compiler/file1.ts (1 errors) ====
export const x: string = 3;
~
!!! error TS2322: Type '3' is not assignable to type 'string'.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
=== tests/cases/compiler/file1.ts ===
export var x;
>x : Symbol(x, Decl(file1.ts, 0, 10))
export const x: string = 3;
>x : Symbol(x, Decl(file1.ts, 0, 12))

5 changes: 3 additions & 2 deletions tests/baselines/reference/isolatedModulesNoEmitOnError.types
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
=== tests/cases/compiler/file1.ts ===
export var x;
>x : any
export const x: string = 3;
>x : string
>3 : 3

2 changes: 1 addition & 1 deletion tests/cases/compiler/isolatedModulesNoEmitOnError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// @target: es6

// @filename: file1.ts
export var x;
export const x: string = 3;