UNPKG

@rightcapital/phpdoc-parser

Version:

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

24 lines (23 loc) 898 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AssertTagValueNode = void 0; const php_doc_tag_value_node_1 = require("./php-doc-tag-value-node"); class AssertTagValueNode extends php_doc_tag_value_node_1.PhpDocTagValueNode { constructor(type, parameter, isNegated, description, isEquality = false) { super(); this.type = type; this.parameter = parameter; this.isNegated = isNegated; this.isEquality = isEquality; this.description = description; } toString() { const isNegated = this.isNegated ? '!' : ''; const isEquality = this.isEquality ? '=' : ''; return `${isNegated}${isEquality}${this.type.toString()} ${this.parameter} ${this.description}`.trim(); } getNodeType() { return 'AssertTagValueNode'; } } exports.AssertTagValueNode = AssertTagValueNode;