UNPKG

clasp-types

Version:

A d.ts generator for clasp projects

35 lines (34 loc) 1.39 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.Method = void 0; var Definition_1 = require("./Definition"); var Method = /** @class */ (function (_super) { __extends(Method, _super); function Method(kind, depth) { return _super.call(this, kind, depth) || this; } Method.prototype.render = function (builder) { var signature = this.kind.signatures[0]; this.addComment(builder, signature.comment); builder.append("" + this.ident() + this.kind.name + "("); this.buildParams(builder, signature.parameters); builder.append('): '); this.buildType(builder, signature.type); builder.append(';').doubleLine(); }; return Method; }(Definition_1.Definition)); exports.Method = Method;