* Adds one or more `Schema` validation checks to the optic chain. * `getResult` fails when any check fails; `set` passes through unchanged. * * **Details** * * - On a Prism, returns a Prism. * - On an Optional, returns an Optional. * * **Example** (Focusing on
(this: Prism<S, A>, ...checks: readonly [SchemaAST.Check<A>, ...Array<SchemaAST.Check<A>>])
| 588 | * @see {@link fromChecks} — standalone prism from checks |
| 589 | */ |
| 590 | check<S, A>(this: Prism<S, A>, ...checks: readonly [SchemaAST.Check<A>, ...Array<SchemaAST.Check<A>>]): Prism<S, A> |
| 591 | check<S, A>( |
| 592 | this: Optional<S, A>, |
| 593 | ...checks: readonly [SchemaAST.Check<A>, ...Array<SchemaAST.Check<A>>] |
no outgoing calls