mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
fix(prettier): class extends clause (#1456)
This commit is contained in:
parent
18d8be0353
commit
59b8fdfaa5
2 changed files with 8 additions and 4 deletions
|
|
@ -9,6 +9,13 @@ pub(super) fn print_class<'a>(p: &mut Prettier<'a>, class: &Class<'a>) -> Doc<'a
|
|||
parts.push(id.format(p));
|
||||
parts.push(ss!(" "));
|
||||
}
|
||||
|
||||
if let Some(super_class) = &class.super_class {
|
||||
parts.push(ss!("extends "));
|
||||
parts.push(super_class.format(p));
|
||||
parts.push(ss!(" "));
|
||||
}
|
||||
|
||||
parts.push(class.body.format(p));
|
||||
Doc::Array(parts)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Compatibility: 124/601 (20.63%)
|
||||
Compatibility: 127/601 (21.13%)
|
||||
|
||||
# Failed
|
||||
|
||||
|
|
@ -149,7 +149,6 @@ Compatibility: 124/601 (20.63%)
|
|||
* class-comment/superclass.js
|
||||
|
||||
### class-extends
|
||||
* class-extends/complex.js
|
||||
* class-extends/extends.js
|
||||
* class-extends/tuple-and-record.js
|
||||
|
||||
|
|
@ -160,13 +159,11 @@ Compatibility: 124/601 (20.63%)
|
|||
### classes
|
||||
* classes/asi.js
|
||||
* classes/assignment.js
|
||||
* classes/binary.js
|
||||
* classes/class-fields-features.js
|
||||
* classes/empty.js
|
||||
* classes/method.js
|
||||
* classes/new.js
|
||||
* classes/property.js
|
||||
* classes/super.js
|
||||
|
||||
### classes/keyword-property
|
||||
* classes/keyword-property/async.js
|
||||
|
|
|
|||
Loading…
Reference in a new issue