(ast: A, checks: Checks | undefined)
| 3384 | |
| 3385 | /** @internal */ |
| 3386 | export function replaceChecks<A extends AST>(ast: A, checks: Checks | undefined): A { |
| 3387 | if (ast._tag === "Suspend" && checks) { |
| 3388 | throw new Error("Cannot add checks to Suspend") |
| 3389 | } |
| 3390 | if (ast.checks === checks) { |
| 3391 | return ast |
| 3392 | } |
| 3393 | return modifyOwnPropertyDescriptors(ast, (d) => { |
| 3394 | d.checks.value = checks |
| 3395 | }) |
| 3396 | } |
| 3397 | |
| 3398 | /** @internal */ |
| 3399 | export function appendChecks<A extends AST>(ast: A, checks: Checks | undefined): A { |
no test coverage detected