mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
fix(codegen): print definite property on AccessorProperty (#19786)
This commit is contained in:
1 parent
6f395cff26
commit
cec7878b6c
2 files changed
+4
No files matched your search
@@ -2833,6 +2833,9 @@ impl Gen for AccessorProperty<'_> {
|
||||
if self.computed {
|
||||
p.print_ascii_byte(b']');
|
||||
}
|
||||
if self.definite {
|
||||
p.print_ascii_byte(b'!');
|
||||
}
|
||||
if let Some(type_annotation) = &self.type_annotation {
|
||||
p.print_colon();
|
||||
p.print_soft_space();
|
||||
|
||||
@@ -32,6 +32,7 @@ fn cases() {
|
||||
test_same("class C extends B {\n\toverride show(): void;\n\toverride hide(): void;\n}\n");
|
||||
test_same("class D extends B {\n\toverride readonly x: number;\n}\n");
|
||||
test_same("class E {\n\tsubscribe!: string;\n}\n");
|
||||
test_same("class F {\n\taccessor value!: string;\n}\n");
|
||||
test_same("export { type as as };\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user