mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
fix(isolated-declarations): don't collect references when ExportNamedDeclaration has source (#5926)
This commit is contained in:
parent
756a571432
commit
b6a9178075
3 changed files with 5 additions and 1 deletions
|
|
@ -137,7 +137,8 @@ impl<'a> Visit<'a> for ScopeTree<'a> {
|
|||
fn visit_export_named_declaration(&mut self, decl: &ExportNamedDeclaration<'a>) {
|
||||
if let Some(declaration) = &decl.declaration {
|
||||
walk_declaration(self, declaration);
|
||||
} else {
|
||||
} else if decl.source.is_none() {
|
||||
// export { ... }
|
||||
for specifier in &decl.specifiers {
|
||||
if let Some(name) = specifier.local.identifier_name() {
|
||||
self.add_type_reference(name.clone());
|
||||
|
|
|
|||
|
|
@ -9,3 +9,5 @@ export const bar: (this: ThisType2) => void = function() {}
|
|||
import { type InferType1, type InferType2 } from 'infer';
|
||||
|
||||
export type F<X extends InferType1> = X extends infer U extends InferType2 ? U : never
|
||||
|
||||
export { Unused } from './unused';
|
||||
|
|
@ -12,3 +12,4 @@ export declare function foo(this: ThisType1 ): void;
|
|||
export declare const bar: (this: ThisType2 ) => void;
|
||||
import { type InferType1, type InferType2 } from "infer";
|
||||
export type F<X extends InferType1> = X extends infer U extends InferType2 ? U : never;
|
||||
export { Unused } from "./unused";
|
||||
|
|
|
|||
Loading…
Reference in a new issue