mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 20:28:58 +00:00
fix(transformer/typescript): declare class incorrectly preserved as runtime class (#3997)
fix: #3993
This commit is contained in:
parent
d0eac46fc8
commit
bdee156c5d
4 changed files with 13 additions and 3 deletions
|
|
@ -83,7 +83,10 @@ impl<'a> TypeScriptAnnotations<'a> {
|
|||
});
|
||||
|
||||
!decl.specifiers.is_empty()
|
||||
|| matches!(&decl.declaration, Some(decl) if !decl.is_typescript_syntax())
|
||||
|| decl
|
||||
.declaration
|
||||
.as_ref()
|
||||
.is_some_and(|decl| !decl.is_typescript_syntax())
|
||||
}
|
||||
}
|
||||
Statement::ExportAllDeclaration(decl) => !decl.export_kind.is_type(),
|
||||
|
|
@ -170,7 +173,6 @@ impl<'a> TypeScriptAnnotations<'a> {
|
|||
class.super_type_parameters = None;
|
||||
class.implements = None;
|
||||
class.r#abstract = false;
|
||||
class.declare = false;
|
||||
}
|
||||
|
||||
pub fn transform_class_body(&mut self, body: &mut ClassBody<'a>) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
commit: 12619ffe
|
||||
|
||||
Passed: 5/5
|
||||
Passed: 6/6
|
||||
|
||||
# All Passed:
|
||||
* babel-plugin-transform-typescript
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
declare const ReactiveMarkerSymbol: unique symbol
|
||||
|
||||
export declare class ReactiveMarker {
|
||||
private [ReactiveMarkerSymbol]?: void
|
||||
}
|
||||
|
||||
export declare const A = 1
|
||||
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
Loading…
Reference in a new issue