mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
fix(isolated-declarations): should emit export {} when only having ImportDeclaration (#4026)
close: #4023
This commit is contained in:
parent
7c915f4665
commit
02ea19a3b7
3 changed files with 9 additions and 1 deletions
|
|
@ -317,7 +317,7 @@ impl<'a> IsolatedDeclarations<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
if last_transformed_len == transformed_indexes.len() {
|
||||
if !transformed_indexes.is_empty() && last_transformed_len == transformed_indexes.len() {
|
||||
need_empty_export_marker = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
1
crates/oxc_isolated_declarations/tests/fixtures/empty-export2.ts
vendored
Normal file
1
crates/oxc_isolated_declarations/tests/fixtures/empty-export2.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
import * as a from "mod";
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
source: crates/oxc_isolated_declarations/tests/mod.rs
|
||||
input_file: crates/oxc_isolated_declarations/tests/fixtures/empty-export2.ts
|
||||
---
|
||||
==================== .D.TS ====================
|
||||
|
||||
export {};
|
||||
Loading…
Reference in a new issue