| 709 | } |
| 710 | } |
| 711 | private _rebuild(recur: (ast: AST) => AST, checks: Checks | undefined, encodingChecks: Checks | undefined) { |
| 712 | const tps = mapOrSame(this.typeParameters, recur) |
| 713 | return tps === this.typeParameters && checks === this.checks && encodingChecks === this.encodingChecks ? |
| 714 | this : |
| 715 | new Declaration(tps, this.run, this.annotations, checks, undefined, this.context, encodingChecks) |
| 716 | } |
| 717 | /** @internal */ |
| 718 | recur(recur: (ast: AST) => AST) { |
| 719 | return this._rebuild(recur, this.checks, this.encodingChecks) |