Private Properties phase 1 (#7666)
* Private Properties phase 1 Co-authored-by: CodingItWrong * Private fields are optional * Docs update
This commit is contained in:
@@ -117,6 +117,21 @@ export function ClassProperty(node: Object) {
|
||||
this.semicolon();
|
||||
}
|
||||
|
||||
export function ClassPrivateProperty(node: Object) {
|
||||
if (node.static) {
|
||||
this.word("static");
|
||||
this.space();
|
||||
}
|
||||
this.print(node.key, node);
|
||||
if (node.value) {
|
||||
this.space();
|
||||
this.token("=");
|
||||
this.space();
|
||||
this.print(node.value, node);
|
||||
}
|
||||
this.semicolon();
|
||||
}
|
||||
|
||||
export function ClassMethod(node: Object) {
|
||||
this._classMethodHead(node);
|
||||
this.space();
|
||||
|
||||
Reference in New Issue
Block a user