From 233b4b0540b90f1998374a5d06e80e380c9968fd Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Wed, 5 Apr 2023 13:39:16 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Pick=20PR=20#53611=20(Remove=20e?= =?UTF-8?q?rror=20on=20redundant=20isolatedM...)=20into=20release-5.0=20(#?= =?UTF-8?q?53612)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Andrew Branch --- src/compiler/program.ts | 3 --- ...ng isolatedModules (verbatimModuleSyntax=true).errors.txt | 2 -- ...dules (verbatimModuleSyntax=true).oldTranspile.errors.txt | 2 -- .../reference/verbatimModuleSyntaxCompat.errors.txt | 2 -- .../reference/verbatimModuleSyntaxCompat2.errors.txt | 5 +---- .../reference/verbatimModuleSyntaxCompat4.errors.txt | 5 +---- 6 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 440ddd9cfc0b0..0dbb3adcec3f6 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -4252,9 +4252,6 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg if (moduleKind === ModuleKind.AMD || moduleKind === ModuleKind.UMD || moduleKind === ModuleKind.System) { createDiagnosticForOptionName(Diagnostics.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System, "verbatimModuleSyntax"); } - if (options.isolatedModules) { - createRedundantOptionDiagnostic("isolatedModules", "verbatimModuleSyntax"); - } if (options.preserveValueImports) { createRedundantOptionDiagnostic("preserveValueImports", "verbatimModuleSyntax"); } diff --git a/tests/baselines/reference/transpile/Does not support setting isolatedModules (verbatimModuleSyntax=true).errors.txt b/tests/baselines/reference/transpile/Does not support setting isolatedModules (verbatimModuleSyntax=true).errors.txt index e2c1781e29fad..3d6bff97de1a3 100644 --- a/tests/baselines/reference/transpile/Does not support setting isolatedModules (verbatimModuleSyntax=true).errors.txt +++ b/tests/baselines/reference/transpile/Does not support setting isolatedModules (verbatimModuleSyntax=true).errors.txt @@ -1,8 +1,6 @@ -error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'. error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -!!! error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'. !!! error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. ==== input.js (0 errors) ==== x; \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Does not support setting isolatedModules (verbatimModuleSyntax=true).oldTranspile.errors.txt b/tests/baselines/reference/transpile/Does not support setting isolatedModules (verbatimModuleSyntax=true).oldTranspile.errors.txt index e2c1781e29fad..3d6bff97de1a3 100644 --- a/tests/baselines/reference/transpile/Does not support setting isolatedModules (verbatimModuleSyntax=true).oldTranspile.errors.txt +++ b/tests/baselines/reference/transpile/Does not support setting isolatedModules (verbatimModuleSyntax=true).oldTranspile.errors.txt @@ -1,8 +1,6 @@ -error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'. error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. -!!! error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'. !!! error TS5107: Option 'target=ES3' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. ==== input.js (0 errors) ==== x; \ No newline at end of file diff --git a/tests/baselines/reference/verbatimModuleSyntaxCompat.errors.txt b/tests/baselines/reference/verbatimModuleSyntaxCompat.errors.txt index e9851f75ee188..4be77662da807 100644 --- a/tests/baselines/reference/verbatimModuleSyntaxCompat.errors.txt +++ b/tests/baselines/reference/verbatimModuleSyntaxCompat.errors.txt @@ -4,7 +4,6 @@ error TS5101: Option 'importsNotUsedAsValues' is deprecated and will stop functi error TS5101: Option 'preserveValueImports' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. Use 'verbatimModuleSyntax' instead. error TS5104: Option 'importsNotUsedAsValues' is redundant and cannot be specified with option 'verbatimModuleSyntax'. -error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'. error TS5104: Option 'preserveValueImports' is redundant and cannot be specified with option 'verbatimModuleSyntax'. error TS5105: Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'. @@ -15,7 +14,6 @@ error TS5105: Option 'verbatimModuleSyntax' cannot be used when 'module' is set !!! error TS5101: Option 'preserveValueImports' is deprecated and will stop functioning in TypeScript 5.5. Specify compilerOption '"ignoreDeprecations": "5.0"' to silence this error. !!! error TS5101: Use 'verbatimModuleSyntax' instead. !!! error TS5104: Option 'importsNotUsedAsValues' is redundant and cannot be specified with option 'verbatimModuleSyntax'. -!!! error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'. !!! error TS5104: Option 'preserveValueImports' is redundant and cannot be specified with option 'verbatimModuleSyntax'. !!! error TS5105: Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'. ==== tests/cases/conformance/externalModules/verbatimModuleSyntaxCompat.ts (0 errors) ==== diff --git a/tests/baselines/reference/verbatimModuleSyntaxCompat2.errors.txt b/tests/baselines/reference/verbatimModuleSyntaxCompat2.errors.txt index 8efe570e1eac1..2c8fcfcbb1eee 100644 --- a/tests/baselines/reference/verbatimModuleSyntaxCompat2.errors.txt +++ b/tests/baselines/reference/verbatimModuleSyntaxCompat2.errors.txt @@ -1,4 +1,3 @@ -/tsconfig.json(4,9): error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'. /tsconfig.json(5,9): error TS5095: Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later. /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. Use 'verbatimModuleSyntax' instead. @@ -8,13 +7,11 @@ /tsconfig.json(6,9): error TS5104: Option 'importsNotUsedAsValues' is redundant and cannot be specified with option 'verbatimModuleSyntax'. -==== /tsconfig.json (6 errors) ==== +==== /tsconfig.json (5 errors) ==== { "compilerOptions": { "verbatimModuleSyntax": true, "isolatedModules": true, - ~~~~~~~~~~~~~~~~~ -!!! error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'. "preserveValueImports": true, ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS5095: Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later. diff --git a/tests/baselines/reference/verbatimModuleSyntaxCompat4.errors.txt b/tests/baselines/reference/verbatimModuleSyntaxCompat4.errors.txt index cca2512076220..df27893087b07 100644 --- a/tests/baselines/reference/verbatimModuleSyntaxCompat4.errors.txt +++ b/tests/baselines/reference/verbatimModuleSyntaxCompat4.errors.txt @@ -1,4 +1,3 @@ -/tsconfig.json(4,9): error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'. /tsconfig.json(5,9): error TS5095: Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later. /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. Use 'verbatimModuleSyntax' instead. @@ -8,13 +7,11 @@ /tsconfig.json(6,9): error TS5104: Option 'importsNotUsedAsValues' is redundant and cannot be specified with option 'verbatimModuleSyntax'. -==== /tsconfig.json (6 errors) ==== +==== /tsconfig.json (5 errors) ==== { "extends": "./tsconfig.base.json", "compilerOptions": { "isolatedModules": true, - ~~~~~~~~~~~~~~~~~ -!!! error TS5104: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'. "preserveValueImports": true, ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS5095: Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later.