-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(15230): change the diagnostic message about a non-module file in …
…an --isolatedModules project
- Loading branch information
1 parent
610fa28
commit ff7b79b
Showing
11 changed files
with
20 additions
and
20 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
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
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
4 changes: 2 additions & 2 deletions
4
tests/baselines/reference/isolatedModulesNoExternalModule.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,7 +1,7 @@ | ||
tests/cases/compiler/file1.ts(1,1): error TS1208: All files must be modules when the '--isolatedModules' flag is provided. | ||
tests/cases/compiler/file1.ts(1,1): error TS1208: A global file cannot be compiled using '--isolatedModules'. Ensure your file contains imports, exports, or an 'export {}' statement. | ||
|
||
|
||
==== tests/cases/compiler/file1.ts (1 errors) ==== | ||
var x; | ||
~~~ | ||
!!! error TS1208: All files must be modules when the '--isolatedModules' flag is provided. | ||
!!! error TS1208: A global file cannot be compiled using '--isolatedModules'. Ensure your file contains imports, exports, or an 'export {}' statement. |
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
4 changes: 2 additions & 2 deletions
4
tests/baselines/reference/isolatedModulesPlainFile-AMD.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,9 +1,9 @@ | ||
tests/cases/compiler/isolatedModulesPlainFile-AMD.ts(1,1): error TS1208: All files must be modules when the '--isolatedModules' flag is provided. | ||
tests/cases/compiler/isolatedModulesPlainFile-AMD.ts(1,1): error TS1208: A global file cannot be compiled using '--isolatedModules'. Ensure your file contains imports, exports, or an 'export {}' statement. | ||
|
||
|
||
==== tests/cases/compiler/isolatedModulesPlainFile-AMD.ts (1 errors) ==== | ||
declare function run(a: number): void; | ||
~~~~~~~ | ||
!!! error TS1208: All files must be modules when the '--isolatedModules' flag is provided. | ||
!!! error TS1208: A global file cannot be compiled using '--isolatedModules'. Ensure your file contains imports, exports, or an 'export {}' statement. | ||
run(1); | ||
|
4 changes: 2 additions & 2 deletions
4
tests/baselines/reference/isolatedModulesPlainFile-CommonJS.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,9 +1,9 @@ | ||
tests/cases/compiler/isolatedModulesPlainFile-CommonJS.ts(1,1): error TS1208: All files must be modules when the '--isolatedModules' flag is provided. | ||
tests/cases/compiler/isolatedModulesPlainFile-CommonJS.ts(1,1): error TS1208: A global file cannot be compiled using '--isolatedModules'. Ensure your file contains imports, exports, or an 'export {}' statement. | ||
|
||
|
||
==== tests/cases/compiler/isolatedModulesPlainFile-CommonJS.ts (1 errors) ==== | ||
declare function run(a: number): void; | ||
~~~~~~~ | ||
!!! error TS1208: All files must be modules when the '--isolatedModules' flag is provided. | ||
!!! error TS1208: A global file cannot be compiled using '--isolatedModules'. Ensure your file contains imports, exports, or an 'export {}' statement. | ||
run(1); | ||
|
4 changes: 2 additions & 2 deletions
4
tests/baselines/reference/isolatedModulesPlainFile-ES6.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,9 +1,9 @@ | ||
tests/cases/compiler/isolatedModulesPlainFile-ES6.ts(1,1): error TS1208: All files must be modules when the '--isolatedModules' flag is provided. | ||
tests/cases/compiler/isolatedModulesPlainFile-ES6.ts(1,1): error TS1208: A global file cannot be compiled using '--isolatedModules'. Ensure your file contains imports, exports, or an 'export {}' statement. | ||
|
||
|
||
==== tests/cases/compiler/isolatedModulesPlainFile-ES6.ts (1 errors) ==== | ||
declare function run(a: number): void; | ||
~~~~~~~ | ||
!!! error TS1208: All files must be modules when the '--isolatedModules' flag is provided. | ||
!!! error TS1208: A global file cannot be compiled using '--isolatedModules'. Ensure your file contains imports, exports, or an 'export {}' statement. | ||
run(1); | ||
|
4 changes: 2 additions & 2 deletions
4
tests/baselines/reference/isolatedModulesPlainFile-System.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,9 +1,9 @@ | ||
tests/cases/compiler/isolatedModulesPlainFile-System.ts(1,1): error TS1208: All files must be modules when the '--isolatedModules' flag is provided. | ||
tests/cases/compiler/isolatedModulesPlainFile-System.ts(1,1): error TS1208: A global file cannot be compiled using '--isolatedModules'. Ensure your file contains imports, exports, or an 'export {}' statement. | ||
|
||
|
||
==== tests/cases/compiler/isolatedModulesPlainFile-System.ts (1 errors) ==== | ||
declare function run(a: number): void; | ||
~~~~~~~ | ||
!!! error TS1208: All files must be modules when the '--isolatedModules' flag is provided. | ||
!!! error TS1208: A global file cannot be compiled using '--isolatedModules'. Ensure your file contains imports, exports, or an 'export {}' statement. | ||
run(1); | ||
|
4 changes: 2 additions & 2 deletions
4
tests/baselines/reference/isolatedModulesPlainFile-UMD.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,9 +1,9 @@ | ||
tests/cases/compiler/isolatedModulesPlainFile-UMD.ts(1,1): error TS1208: All files must be modules when the '--isolatedModules' flag is provided. | ||
tests/cases/compiler/isolatedModulesPlainFile-UMD.ts(1,1): error TS1208: A global file cannot be compiled using '--isolatedModules'. Ensure your file contains imports, exports, or an 'export {}' statement. | ||
|
||
|
||
==== tests/cases/compiler/isolatedModulesPlainFile-UMD.ts (1 errors) ==== | ||
declare function run(a: number): void; | ||
~~~~~~~ | ||
!!! error TS1208: All files must be modules when the '--isolatedModules' flag is provided. | ||
!!! error TS1208: A global file cannot be compiled using '--isolatedModules'. Ensure your file contains imports, exports, or an 'export {}' statement. | ||
run(1); | ||
|
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