mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
fix(isolated-declarations): missing empty export when has an export declare (#5925)
This commit is contained in:
parent
b80a9eec7f
commit
756a571432
3 changed files with 7 additions and 1 deletions
|
|
@ -253,7 +253,7 @@ impl<'a> IsolatedDeclarations<'a> {
|
|||
transformed_spans.insert(decl.span);
|
||||
if let Some(new_decl) = self.transform_export_named_declaration(decl) {
|
||||
*decl = self.ast.alloc(new_decl);
|
||||
} else {
|
||||
} else if decl.declaration.is_none() {
|
||||
need_empty_export_marker = false;
|
||||
}
|
||||
self.scope.visit_export_named_declaration(decl);
|
||||
|
|
|
|||
|
|
@ -2,3 +2,7 @@ type A = string;
|
|||
export function a(): A {
|
||||
return ""
|
||||
}
|
||||
|
||||
export declare const ShallowReactiveMarker: unique symbol
|
||||
|
||||
export type ShallowReactive<T> = T & { [ShallowReactiveMarker]?: true }
|
||||
|
|
|
|||
|
|
@ -6,4 +6,6 @@ input_file: crates/oxc_isolated_declarations/tests/fixtures/empty-export.ts
|
|||
|
||||
type A = string;
|
||||
export declare function a(): A;
|
||||
export declare const ShallowReactiveMarker: unique symbol;
|
||||
export type ShallowReactive<T> = T & { [ShallowReactiveMarker]?: true };
|
||||
export {};
|
||||
|
|
|
|||
Loading…
Reference in a new issue