(ast: A, checks: Checks | undefined)
| 4408 | |
| 4409 | /** @internal */ |
| 4410 | export function replaceChecks<A extends AST>(ast: A, checks: Checks | undefined): A { |
| 4411 | if (ast._tag === "Suspend" && checks) { |
| 4412 | throw new Error("Cannot add checks to Suspend") |
| 4413 | } |
| 4414 | if (ast.checks === checks) { |
| 4415 | return ast |
| 4416 | } |
| 4417 | return copy(ast, { checks }) |
| 4418 | } |
| 4419 | |
| 4420 | /** @internal */ |
| 4421 | export function appendChecks<A extends AST>(ast: A, checks: Checks | undefined): A { |
no test coverage detected