Parse class static block (#12079)
Co-authored-by: Brian Ng <bng412@gmail.com>
This commit is contained in:
committed by
Nicolò Ribaudo
parent
6830c90ac9
commit
3ccca88178
@@ -134,3 +134,18 @@ export function _classMethodHead(node) {
|
||||
this.tsPrintClassMemberModifiers(node, /* isField */ false);
|
||||
this._methodHead(node);
|
||||
}
|
||||
|
||||
export function StaticBlock(node) {
|
||||
this.word("static");
|
||||
this.space();
|
||||
this.token("{");
|
||||
if (node.body.length === 0) {
|
||||
this.token("}");
|
||||
} else {
|
||||
this.newline();
|
||||
this.printSequence(node.body, node, {
|
||||
indent: true,
|
||||
});
|
||||
this.rightBrace();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user