mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
refactor(transformer/typescript): determine whether to remove ExportSpeicifer by ReferenceFlags (#4513)
After https://github.com/oxc-project/oxc/pull/4511. We can determine if a binding is a type binding just by the `ReferenceFlags`. We can make it even better with `ident.reference_flag` once #4512 is sorted out
This commit is contained in:
parent
cf1854be7c
commit
96602bf98e
1 changed files with 1 additions and 5 deletions
|
|
@ -85,11 +85,7 @@ impl<'a> TypeScriptAnnotations<'a> {
|
|||
&specifier.local
|
||||
{
|
||||
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_value()
|
||||
},
|
||||
)
|
||||
ctx.symbols().get_reference(id).is_type()
|
||||
})
|
||||
} else {
|
||||
false
|
||||
|
|
|
|||
Loading…
Reference in a new issue