Sha256: baa4d4f7ec7ddb5e79bf435f396949d9149e62ca3f5bfa93b12668a75d52fc41
Contents?: true
Size: 1.42 KB
Versions: 3
Compression:
Stored size: 1.42 KB
Contents
"use strict"; exports.__esModule = true; exports.ClassDeclaration = ClassDeclaration; exports.ClassBody = ClassBody; exports.ClassProperty = ClassProperty; exports.MethodDefinition = MethodDefinition; function ClassDeclaration(node, print) { print.list(node.decorators); this.push("class"); if (node.id) { this.push(" "); print.plain(node.id); } print.plain(node.typeParameters); if (node.superClass) { this.push(" extends "); print.plain(node.superClass); print.plain(node.superTypeParameters); } if (node["implements"]) { this.push(" implements "); print.join(node["implements"], { separator: ", " }); } this.space(); print.plain(node.body); } exports.ClassExpression = ClassDeclaration; function ClassBody(node, print) { if (node.body.length === 0) { this.push("{}"); } else { this.push("{"); this.newline(); this.indent(); print.sequence(node.body); this.dedent(); this.rightBrace(); } } function ClassProperty(node, print) { print.list(node.decorators); if (node["static"]) this.push("static "); print.plain(node.key); print.plain(node.typeAnnotation); if (node.value) { this.space(); this.push("="); this.space(); print.plain(node.value); } this.semicolon(); } function MethodDefinition(node, print) { print.list(node.decorators); if (node["static"]) { this.push("static "); } this._method(node, print); }
Version data entries
3 entries across 3 versions & 1 rubygems