UNPKG

@rightcapital/phpdoc-parser

Version:

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

29 lines (28 loc) 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ParamTagValueNode = void 0; const php_doc_tag_value_node_1 = require("./php-doc-tag-value-node"); class ParamTagValueNode extends php_doc_tag_value_node_1.PhpDocTagValueNode { constructor(type, isVariadic, parameterName, description, isReference = false) { super(); this.type = type; this.isVariadic = isVariadic; this.parameterName = parameterName; this.description = description; this.isReference = isReference; this.type = type; this.isReference = isReference; this.isVariadic = isVariadic; this.parameterName = parameterName; this.description = description; } toString() { const reference = this.isReference ? '&' : ''; const variadic = this.isVariadic ? '...' : ''; return `${this.type.toString()} ${reference}${variadic}${this.parameterName} ${this.description}`.trim(); } getNodeType() { return 'ParamTagValueNode'; } } exports.ParamTagValueNode = ParamTagValueNode;