UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for static analysis and code manipulation.

38 lines (37 loc) 1.71 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var manipulation_1 = require("../../../manipulation"); var base_1 = require("../base"); var callBaseSet_1 = require("../callBaseSet"); var TypeElement_1 = require("./TypeElement"); var callBaseGetStructure_1 = require("../callBaseGetStructure"); exports.PropertySignatureBase = base_1.ChildOrderableNode(base_1.JSDocableNode(base_1.ReadonlyableNode(base_1.QuestionTokenableNode(base_1.InitializerExpressionableNode(base_1.TypedNode(base_1.PropertyNamedNode(base_1.ModifierableNode(TypeElement_1.TypeElement)))))))); var PropertySignature = /** @class */ (function (_super) { tslib_1.__extends(PropertySignature, _super); function PropertySignature() { return _super !== null && _super.apply(this, arguments) || this; } /** * Removes this property signature. */ PropertySignature.prototype.remove = function () { manipulation_1.removeInterfaceMember(this); }; /** * Sets the node from a structure. * @param structure - Structure to set the node with. */ PropertySignature.prototype.set = function (structure) { callBaseSet_1.callBaseSet(exports.PropertySignatureBase.prototype, this, structure); return this; }; /** * Gets the structure equivalent to this node. */ PropertySignature.prototype.getStructure = function () { return callBaseGetStructure_1.callBaseGetStructure(exports.PropertySignatureBase.prototype, this, {}); }; return PropertySignature; }(exports.PropertySignatureBase)); exports.PropertySignature = PropertySignature;