(ast: A, annotations: Schema.Annotations.Annotations)
| 4400 | |
| 4401 | /** @internal */ |
| 4402 | export function annotate<A extends AST>(ast: A, annotations: Schema.Annotations.Annotations): A { |
| 4403 | if (ast.checks) { |
| 4404 | return replaceChecks(ast, mapLast(ast.checks, (check) => check.annotate(annotations))) |
| 4405 | } |
| 4406 | return copy(ast, { annotations: { ...ast.annotations, ...annotations } }) |
| 4407 | } |
| 4408 | |
| 4409 | /** @internal */ |
| 4410 | export function replaceChecks<A extends AST>(ast: A, checks: Checks | undefined): A { |
no test coverage detected