node_modules/babel-generator/lib/generators/classes.js in babel-schmooze-sprockets-0.1.0.alpha.3 vs node_modules/babel-generator/lib/generators/classes.js in babel-schmooze-sprockets-0.1.0
- old
+ new
@@ -1,13 +1,12 @@
-"use strict";
+/*istanbul ignore next*/"use strict";
exports.__esModule = true;
exports.ClassDeclaration = ClassDeclaration;
-exports.ClassBody = ClassBody;
-exports.ClassProperty = ClassProperty;
-exports.ClassMethod = ClassMethod;
-
+/*istanbul ignore next*/exports.ClassBody = ClassBody;
+/*istanbul ignore next*/exports.ClassProperty = ClassProperty;
+/*istanbul ignore next*/exports.ClassMethod = ClassMethod;
function ClassDeclaration(node) {
this.printJoin(node.decorators, node, { separator: "" });
this.push("class");
if (node.id) {
@@ -21,21 +20,20 @@
this.push(" extends ");
this.print(node.superClass, node);
this.print(node.superTypeParameters, node);
}
- if (node["implements"]) {
+ if (node.implements) {
this.push(" implements ");
- this.printJoin(node["implements"], node, { separator: ", " });
+ this.printJoin(node.implements, node, { separator: ", " });
}
this.space();
this.print(node.body, node);
}
-exports.ClassExpression = ClassDeclaration;
-
+/*istanbul ignore next*/exports.ClassExpression = ClassDeclaration;
function ClassBody(node) {
this.push("{");
this.printInnerComments(node);
if (node.body.length === 0) {
this.push("}");
@@ -51,11 +49,11 @@
}
function ClassProperty(node) {
this.printJoin(node.decorators, node, { separator: "" });
- if (node["static"]) this.push("static ");
+ if (node.static) this.push("static ");
this.print(node.key, node);
this.print(node.typeAnnotation, node);
if (node.value) {
this.space();
this.push("=");
@@ -66,10 +64,10 @@
}
function ClassMethod(node) {
this.printJoin(node.decorators, node, { separator: "" });
- if (node["static"]) {
+ if (node.static) {
this.push("static ");
}
if (node.kind === "constructorCall") {
this.push("call ");
\ No newline at end of file