| 1799 | }) |
| 1800 | } |
| 1801 | private _rebuild(recur: (ast: AST) => AST, checks: Checks | undefined, encodingChecks: Checks | undefined) { |
| 1802 | const elements = mapOrSame(this.elements, recur) |
| 1803 | const rest = mapOrSame(this.rest, recur) |
| 1804 | return elements === this.elements && rest === this.rest && checks === this.checks && |
| 1805 | encodingChecks === this.encodingChecks ? |
| 1806 | this : |
| 1807 | new Arrays( |
| 1808 | this.isMutable, |
| 1809 | elements, |
| 1810 | rest, |
| 1811 | this.annotations, |
| 1812 | checks, |
| 1813 | undefined, |
| 1814 | this.context, |
| 1815 | encodingChecks |
| 1816 | ) |
| 1817 | } |
| 1818 | /** @internal */ |
| 1819 | recur(recur: (ast: AST) => AST) { |
| 1820 | return this._rebuild(recur, this.checks, this.encodingChecks) |