mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
fix(codegen): add missing declare to PropertyDefinition (#4937)
I'm seeing a broken test for
```rust
#[test]
fn dts_class_decl_prop_test() {
transform_dts_test(
"export class Foo { declare a: string }",
"export declare class Foo {
a: string;
}",
);
}
```
can you double check @Dunqing ?
This commit is contained in:
parent
bea76f0f24
commit
bbf9ec0774
1 changed files with 3 additions and 0 deletions
|
|
@ -2535,6 +2535,9 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for PropertyDefinition<'a> {
|
|||
fn gen(&self, p: &mut Codegen<{ MINIFY }>, ctx: Context) {
|
||||
p.add_source_mapping(self.span.start);
|
||||
self.decorators.gen(p, ctx);
|
||||
if self.declare {
|
||||
p.print_str("declare ");
|
||||
}
|
||||
if let Some(accessibility) = &self.accessibility {
|
||||
accessibility.gen(p, ctx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue