mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
feat(transformer/typescript): transform import {} from "mod" to import "mod" (#3866)
close: #3736
This commit is contained in:
parent
7b2f259ebc
commit
5501d5ce33
2 changed files with 4 additions and 4 deletions
|
|
@ -93,6 +93,8 @@ impl<'a> TypeScriptAnnotations<'a> {
|
|||
true
|
||||
} else if let Some(specifiers) = &mut decl.specifiers {
|
||||
if specifiers.is_empty() {
|
||||
// import {} from 'mod' -> import 'mod'
|
||||
decl.specifiers = None;
|
||||
true
|
||||
} else {
|
||||
specifiers.retain(|specifier| {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
commit: 12619ffe
|
||||
|
||||
Passed: 473/927
|
||||
Passed: 475/927
|
||||
|
||||
# All Passed:
|
||||
* babel-preset-react
|
||||
|
|
@ -445,14 +445,12 @@ Passed: 473/927
|
|||
* opts/optimizeConstEnums/input.ts
|
||||
* opts/rewriteImportExtensions/input.ts
|
||||
|
||||
# babel-plugin-transform-typescript (129/151)
|
||||
# babel-plugin-transform-typescript (131/151)
|
||||
* enum/mix-references/input.ts
|
||||
* enum/ts5.0-const-foldable/input.ts
|
||||
* exports/declared-types/input.ts
|
||||
* exports/interface/input.ts
|
||||
* imports/elide-no-import-specifiers/input.ts
|
||||
* imports/elision-locations/input.ts
|
||||
* imports/import-removed-exceptions/input.ts
|
||||
* imports/only-remove-type-imports/input.ts
|
||||
* imports/type-only-export-specifier-2/input.ts
|
||||
* imports/type-only-import-specifier-4/input.ts
|
||||
|
|
|
|||
Loading…
Reference in a new issue