mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add --preserveValueImports (#44619)
* Add compiler option * Require es2015+ * Do not elide any imports or exports in preserve-exact * Add errors for writing imports/exports that reference elided names * Improve diagnostics wording * Update API baselines * Redo as noEraslingImportedNames * Update option category * Update baselines * Lint * Fix up transformer comments * Fix errors from merge * Update other error code baseline * Rename to "preserveValueImports" * Clean up, reword diagnostics * Update API baselines * Update other baseline affected by error message reword * Update tsconfig baselines * Add debug assertion instead of !
This commit is contained in:
@@ -571,7 +571,7 @@ namespace ts {
|
||||
type: new Map(getEntries({
|
||||
remove: ImportsNotUsedAsValues.Remove,
|
||||
preserve: ImportsNotUsedAsValues.Preserve,
|
||||
error: ImportsNotUsedAsValues.Error
|
||||
error: ImportsNotUsedAsValues.Error,
|
||||
})),
|
||||
affectsEmit: true,
|
||||
affectsSemanticDiagnostics: true,
|
||||
@@ -1169,6 +1169,14 @@ namespace ts {
|
||||
description: Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,
|
||||
defaultValueDescription: Diagnostics.true_for_ES2022_and_above_including_ESNext
|
||||
},
|
||||
{
|
||||
name: "preserveValueImports",
|
||||
type: "boolean",
|
||||
affectsEmit: true,
|
||||
category: Diagnostics.Emit,
|
||||
description: Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
||||
},
|
||||
|
||||
{
|
||||
name: "keyofStringsOnly",
|
||||
type: "boolean",
|
||||
|
||||
Reference in New Issue
Block a user