()
| 499 | this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; |
| 500 | } |
| 501 | get hasMagic() { |
| 502 | if (this.#hasMagic !== void 0) |
| 503 | return this.#hasMagic; |
| 504 | for (const p of this.#parts) { |
| 505 | if (typeof p === "string") |
| 506 | continue; |
| 507 | if (p.type || p.hasMagic) |
| 508 | return this.#hasMagic = true; |
| 509 | } |
| 510 | return this.#hasMagic; |
| 511 | } |
| 512 | // reconstructs the pattern |
| 513 | toString() { |
| 514 | return this.#toString !== void 0 ? this.#toString : !this.type ? this.#toString = this.#parts.map((p) => String(p)).join("") : this.#toString = this.type + "(" + this.#parts.map((p) => String(p)).join("|") + ")"; |
no outgoing calls
no test coverage detected