UNPKG

@rightcapital/phpdoc-parser

Version:

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

32 lines (31 loc) 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ArrayShapeNode = exports.ArrayShapeNodeKind = void 0; const type_node_1 = require("./type-node"); var ArrayShapeNodeKind; (function (ArrayShapeNodeKind) { ArrayShapeNodeKind["ARRAY"] = "array"; ArrayShapeNodeKind["LIST"] = "list"; })(ArrayShapeNodeKind || (exports.ArrayShapeNodeKind = ArrayShapeNodeKind = {})); class ArrayShapeNode extends type_node_1.TypeNode { constructor(items, sealed = true, kind = ArrayShapeNodeKind.ARRAY) { super(); this.items = items; this.sealed = sealed; this.kind = kind; this.items = items; this.sealed = sealed; this.kind = kind; } toString() { const { items } = this; if (!this.sealed) { items.push('...'); } return `${this.kind}{${items.join(', ')}}`; } getNodeType() { return 'ArrayShapeNode'; } } exports.ArrayShapeNode = ArrayShapeNode;