UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

28 lines (26 loc) 882 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const ts = require("typescript"); const callBaseFill_1 = require("./../callBaseFill"); function StaticableNode(Base) { return class extends Base { isStatic() { return this.hasModifier(ts.SyntaxKind.StaticKeyword); } getStaticKeyword() { return this.getFirstModifierByKind(ts.SyntaxKind.StaticKeyword); } setIsStatic(value) { this.toggleModifier("static", value); return this; } fill(structure) { callBaseFill_1.callBaseFill(Base.prototype, this, structure); if (structure.isStatic != null) this.setIsStatic(structure.isStatic); return this; } }; } exports.StaticableNode = StaticableNode; //# sourceMappingURL=StaticableNode.js.map