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

Method check

packages/effect/src/Optic.ts:590–590  ·  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

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

Callers 15

brand.tsFile · 0.65
Generated.tsFile · 0.65
IndexedDb.tsFile · 0.65
Brand.tst.tsFile · 0.65
Schema.tst.tsFile · 0.65
toIso.tst.tsFile · 0.65
Formatter.test.tsFile · 0.65
JsonSchema.test.tsFile · 0.65
Optic.test.tsFile · 0.65
Config.test.tsFile · 0.65
Brand.test.tsFile · 0.65

Implementers 1

OptionalImplpackages/effect/src/Optic.ts

Calls

no outgoing calls

Tested by 3

makeSchemaFunction · 0.52
makeFunction · 0.52
filterJsonFunction · 0.52