mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
fix(isolated-declarations): don't collect references when ExportNamedDeclaration has source (#5926)
This commit is contained in:
1 parent
756a571432
commit
b6a9178075
3 files changed
+5
-1
No files matched your search
@@ -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";
|
||||
Reference in new issue
Block a user