UNPKG

@rightcapital/phpdoc-parser

Version:

TypeScript version of PHPDoc parser with support for intersection types and generics

25 lines (24 loc) 938 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TemplateTagValueNode = void 0; const php_doc_tag_value_node_1 = require("./php-doc-tag-value-node"); class TemplateTagValueNode extends php_doc_tag_value_node_1.PhpDocTagValueNode { constructor(name, bound, description, defaultTypeNode = null) { super(); this.name = name; this.bound = bound; this.description = description; this.defaultTypeNode = defaultTypeNode; } toString() { const bound = this.bound !== null ? ` of ${this.bound.toString()}` : ''; const defaultString = this.defaultTypeNode !== null ? ` = ${this.defaultTypeNode.toString()}` : ''; return `${this.name}${bound}${defaultString} ${this.description}`.trim(); } getNodeType() { return 'TemplateTagValueNode'; } } exports.TemplateTagValueNode = TemplateTagValueNode;