mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 20:28:58 +00:00
fix(transformer/typescript): incorrect eliminate exports when the referenced symbol is both value and type (#4507)
This commit is contained in:
parent
963a2d1b85
commit
ecdee88cfb
3 changed files with 14 additions and 2 deletions
|
|
@ -87,7 +87,7 @@ impl<'a> TypeScriptAnnotations<'a> {
|
|||
ident.reference_id.get().is_some_and(|id| {
|
||||
ctx.symbols().references[id].symbol_id().is_some_and(
|
||||
|symbol_id| {
|
||||
ctx.symbols().get_flag(symbol_id).is_type()
|
||||
!ctx.symbols().get_flag(symbol_id).is_value()
|
||||
},
|
||||
)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -8,4 +8,10 @@ namespace Name {
|
|||
export const Q = 0;
|
||||
}
|
||||
|
||||
export { Im, Ok, Foo, Bar, Func, Baz, Baq, Name };
|
||||
export { Im, Ok, Foo, Bar, Func, Baz, Baq, Name };
|
||||
|
||||
type T = number;
|
||||
function T(): T {
|
||||
return 123;
|
||||
}
|
||||
export { T }
|
||||
|
|
@ -6,4 +6,10 @@ let Name;
|
|||
(function(_Name) {
|
||||
const Q = _Name.Q = 0;
|
||||
})(Name || (Name = {}));
|
||||
|
||||
export { Im, Ok, Foo, Bar, Func, Name };
|
||||
|
||||
function T() {
|
||||
return 123;
|
||||
}
|
||||
export { T }
|
||||
Loading…
Reference in a new issue