MCPcopy Create free account
hub / github.com/Effect-TS/effect / check

Method check

packages/effect/src/Optic.ts:600–600  ·  view source on GitHub ↗

* 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>>])

Source from the content-addressed store, hash-verified

598 * @see {@link fromChecks} — standalone prism from checks
599 */
600 check<S, A>(this: Prism<S, A>, ...checks: readonly [SchemaAST.Check<A>, ...Array<SchemaAST.Check<A>>]): Prism<S, A>
601 check<S, A>(
602 this: Optional<S, A>,
603 ...checks: readonly [SchemaAST.Check<A>, ...Array<SchemaAST.Check<A>>]

Callers 15

brand.tsFile · 0.65
boundedFunction · 0.65
envelope.tsFile · 0.65
Generated.tsFile · 0.65
IndexedDb.tsFile · 0.65
TestDevice.test.tsFile · 0.65
tools.tsFile · 0.65

Implementers 1

OptionalImplpackages/effect/src/Optic.ts

Calls

no outgoing calls

Tested by 4

makeFixturesFunction · 0.52
acceptsNegativeFunction · 0.52
makeFunction · 0.52
filterJsonFunction · 0.52