UNPKG

@rightcapital/phpdoc-parser

Version:

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

23 lines (22 loc) 710 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ArrayShapeItemNode = void 0; const type_node_1 = require("./type-node"); class ArrayShapeItemNode extends type_node_1.TypeNode { constructor(keyName, optional, valueType) { super(); this.keyName = keyName; this.optional = optional; this.valueType = valueType; } toString() { if (this.keyName !== null) { return `${String(this.keyName)}${this.optional ? '?' : ''}: ${String(this.valueType)}`; } return String(this.valueType); } getNodeType() { return 'ArrayShapeItemNode'; } } exports.ArrayShapeItemNode = ArrayShapeItemNode;