Skip to content

Commit 233b4b0

Browse files
TypeScript Botandrewbranch
TypeScript Bot
andauthored
🤖 Pick PR #53611 (Remove error on redundant isolatedM...) into release-5.0 (#53612)
Co-authored-by: Andrew Branch <[email protected]>
1 parent 365cb58 commit 233b4b0

6 files changed

+2
-17
lines changed

‎src/compiler/program.ts

-3
Original file line numberDiff line numberDiff line change
@@ -4252,9 +4252,6 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
42524252
if (moduleKind === ModuleKind.AMD || moduleKind === ModuleKind.UMD || moduleKind === ModuleKind.System) {
42534253
createDiagnosticForOptionName(Diagnostics.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System, "verbatimModuleSyntax");
42544254
}
4255-
if (options.isolatedModules) {
4256-
createRedundantOptionDiagnostic("isolatedModules", "verbatimModuleSyntax");
4257-
}
42584255
if (options.preserveValueImports) {
42594256
createRedundantOptionDiagnostic("preserveValueImports", "verbatimModuleSyntax");
42604257
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
21
error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
32

43

5-
!!! error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
64
!!! error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
75
==== input.js (0 errors) ====
86
x;
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
21
error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
32

43

5-
!!! error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
64
!!! error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
75
==== input.js (0 errors) ====
86
x;

‎tests/baselines/reference/verbatimModuleSyntaxCompat.errors.txt

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ error TS5101: Option 'importsNotUsedAsValues' is deprecated and will stop functi
44
error TS5101: Option 'preserveValueImports' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
55
Use 'verbatimModuleSyntax' instead.
66
error TS5104: Option 'importsNotUsedAsValues' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
7-
error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
87
error TS5104: Option 'preserveValueImports' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
98
error TS5105: Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.
109

@@ -15,7 +14,6 @@ error TS5105: Option 'verbatimModuleSyntax' cannot be used when 'module' is set
1514
!!! error TS5101: Option 'preserveValueImports' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
1615
!!! error TS5101: Use 'verbatimModuleSyntax' instead.
1716
!!! error TS5104: Option 'importsNotUsedAsValues' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
18-
!!! error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
1917
!!! error TS5104: Option 'preserveValueImports' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
2018
!!! error TS5105: Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'.
2119
==== tests/cases/conformance/externalModules/verbatimModuleSyntaxCompat.ts (0 errors) ====

‎tests/baselines/reference/verbatimModuleSyntaxCompat2.errors.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/tsconfig.json(4,9): error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
21
/tsconfig.json(5,9): error TS5095: Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later.
32
/tsconfig.json(5,9): error TS5101: Option 'preserveValueImports' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
43
Use 'verbatimModuleSyntax' instead.
@@ -8,13 +7,11 @@
87
/tsconfig.json(6,9): error TS5104: Option 'importsNotUsedAsValues' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
98

109

11-
==== /tsconfig.json (6 errors) ====
10+
==== /tsconfig.json (5 errors) ====
1211
{
1312
"compilerOptions": {
1413
"verbatimModuleSyntax": true,
1514
"isolatedModules": true,
16-
~~~~~~~~~~~~~~~~~
17-
!!! error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
1815
"preserveValueImports": true,
1916
~~~~~~~~~~~~~~~~~~~~~~
2017
!!! error TS5095: Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later.

‎tests/baselines/reference/verbatimModuleSyntaxCompat4.errors.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/tsconfig.json(4,9): error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
21
/tsconfig.json(5,9): error TS5095: Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later.
32
/tsconfig.json(5,9): error TS5101: Option 'preserveValueImports' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error.
43
Use 'verbatimModuleSyntax' instead.
@@ -8,13 +7,11 @@
87
/tsconfig.json(6,9): error TS5104: Option 'importsNotUsedAsValues' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
98

109

11-
==== /tsconfig.json (6 errors) ====
10+
==== /tsconfig.json (5 errors) ====
1211
{
1312
"extends": "./tsconfig.base.json",
1413
"compilerOptions": {
1514
"isolatedModules": true,
16-
~~~~~~~~~~~~~~~~~
17-
!!! error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
1815
"preserveValueImports": true,
1916
~~~~~~~~~~~~~~~~~~~~~~
2017
!!! error TS5095: Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later.

0 commit comments

Comments
 (0)