-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix #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 <[email protected]>
- Loading branch information
1 parent
5b79b94
commit f9d12ed
Showing
5 changed files
with
11 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
tests/baselines/reference/isolatedModulesNoEmitOnError.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'. |
4 changes: 2 additions & 2 deletions
4
tests/baselines/reference/isolatedModulesNoEmitOnError.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
// @target: es6 | ||
|
||
// @filename: file1.ts | ||
export var x; | ||
export const x: string = 3; |