node_modules/@babel/generator/lib/generators/classes.js in immosquare-cleaner-0.1.47 vs node_modules/@babel/generator/lib/generators/classes.js in immosquare-cleaner-0.1.48
- old
+ new
@@ -31,38 +31,40 @@
this.space();
}
this.word("class");
if (node.id) {
this.space();
- this.print(node.id, node);
+ this.print(node.id);
}
- this.print(node.typeParameters, node);
+ this.print(node.typeParameters);
if (node.superClass) {
this.space();
this.word("extends");
this.space();
- this.print(node.superClass, node);
- this.print(node.superTypeParameters, node);
+ this.print(node.superClass);
+ this.print(node.superTypeParameters);
}
if (node.implements) {
this.space();
this.word("implements");
this.space();
this.printList(node.implements, node);
}
this.space();
- this.print(node.body, node);
+ this.print(node.body);
}
function ClassBody(node) {
this.tokenChar(123);
if (node.body.length === 0) {
this.tokenChar(125);
} else {
this.newline();
+ const exit = this.enterForStatementInit(false);
this.printSequence(node.body, node, {
indent: true
});
+ exit();
if (!this.endsWith(10)) this.newline();
this.rightBrace(node);
}
}
function ClassProperty(node) {
@@ -71,28 +73,28 @@
const endLine = (_node$key$loc = node.key.loc) == null || (_node$key$loc = _node$key$loc.end) == null ? void 0 : _node$key$loc.line;
if (endLine) this.catchUp(endLine);
this.tsPrintClassMemberModifiers(node);
if (node.computed) {
this.tokenChar(91);
- this.print(node.key, node);
+ this.print(node.key);
this.tokenChar(93);
} else {
this._variance(node);
- this.print(node.key, node);
+ this.print(node.key);
}
if (node.optional) {
this.tokenChar(63);
}
if (node.definite) {
this.tokenChar(33);
}
- this.print(node.typeAnnotation, node);
+ this.print(node.typeAnnotation);
if (node.value) {
this.space();
this.tokenChar(61);
this.space();
- this.print(node.value, node);
+ this.print(node.value);
}
this.semicolon();
}
function ClassAccessorProperty(node) {
var _node$key$loc2;
@@ -102,55 +104,55 @@
this.tsPrintClassMemberModifiers(node);
this.word("accessor", true);
this.space();
if (node.computed) {
this.tokenChar(91);
- this.print(node.key, node);
+ this.print(node.key);
this.tokenChar(93);
} else {
this._variance(node);
- this.print(node.key, node);
+ this.print(node.key);
}
if (node.optional) {
this.tokenChar(63);
}
if (node.definite) {
this.tokenChar(33);
}
- this.print(node.typeAnnotation, node);
+ this.print(node.typeAnnotation);
if (node.value) {
this.space();
this.tokenChar(61);
this.space();
- this.print(node.value, node);
+ this.print(node.value);
}
this.semicolon();
}
function ClassPrivateProperty(node) {
this.printJoin(node.decorators, node);
if (node.static) {
this.word("static");
this.space();
}
- this.print(node.key, node);
- this.print(node.typeAnnotation, node);
+ this.print(node.key);
+ this.print(node.typeAnnotation);
if (node.value) {
this.space();
this.tokenChar(61);
this.space();
- this.print(node.value, node);
+ this.print(node.value);
}
this.semicolon();
}
function ClassMethod(node) {
this._classMethodHead(node);
this.space();
- this.print(node.body, node);
+ this.print(node.body);
}
function ClassPrivateMethod(node) {
this._classMethodHead(node);
this.space();
- this.print(node.body, node);
+ this.print(node.body);
}
function _classMethodHead(node) {
var _node$key$loc3;
this.printJoin(node.decorators, node);
const endLine = (_node$key$loc3 = node.key.loc) == null || (_node$key$loc3 = _node$key$loc3.end) == null ? void 0 : _node$key$loc3.line;