UNPKG

@rightcapital/phpdoc-parser

Version:

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

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