mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
feat(codegen): print accessibility for MethodDefinition (#3690)
This commit is contained in:
parent
35c382ef24
commit
a56cb1b482
1 changed files with 5 additions and 12 deletions
|
|
@ -2302,7 +2302,9 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for MethodDefinition<'a> {
|
|||
if self.r#type == MethodDefinitionType::TSAbstractMethodDefinition {
|
||||
p.print_str(b"abstract ");
|
||||
}
|
||||
|
||||
if let Some(accessibility) = &self.accessibility {
|
||||
accessibility.gen(p, ctx);
|
||||
}
|
||||
if self.r#static {
|
||||
p.print_str(b"static ");
|
||||
}
|
||||
|
|
@ -2356,18 +2358,9 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for PropertyDefinition<'a> {
|
|||
p.print_str(b"abstract ");
|
||||
}
|
||||
if let Some(accessibility) = &self.accessibility {
|
||||
match accessibility {
|
||||
TSAccessibility::Private => {
|
||||
p.print_str(b"private ");
|
||||
}
|
||||
TSAccessibility::Protected => {
|
||||
p.print_str(b"protected ");
|
||||
}
|
||||
TSAccessibility::Public => {
|
||||
p.print_str(b"public ");
|
||||
}
|
||||
}
|
||||
accessibility.gen(p, ctx);
|
||||
}
|
||||
|
||||
if self.r#static {
|
||||
p.print_str(b"static ");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue