MCPcopy Create free account
hub / github.com/effect-app/libs / validate

Function validate

repos/effect/packages/effect/src/Schema.ts:1121–1140  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

1119
1120/**
1121 * A schema that additionally supports optic (lens/prism) operations.
1122 *
1123 * **Details**
1124 *
1125 * `Optic<T, Iso>` extends {@link Schema}`<T>` with an `Iso` type that
1126 * describes the isomorphic counterpart used by the optic layer. Crucially,
1127 * decoding and encoding require *no* Effect services (`DecodingServices` and
1128 * `EncodingServices` are both `never`), which means the optic can operate
1129 * purely without an Effect runtime.
1130 *
1131 * Most primitive schemas (e.g. `Schema.String`, `Schema.Number`) implement
1132 * `Optic` automatically. You normally interact with this interface through
1133 * {@link Optic_} utilities rather than constructing it directly.
1134 *
1135 * @category models
1136 * @since 4.0.0
1137 */
1138export interface Optic<out T, out Iso> extends Schema<T> {
1139 readonly "Iso": Iso
1140 readonly "DecodingServices": never
1141 readonly "EncodingServices": never
1142 readonly "Rebuild": Optic<T, Iso>
1143}

Callers

nothing calls this directly

Calls 6

makeStandardResultFunction · 0.85
pollUnsafeMethod · 0.80
addObserverMethod · 0.80
decodeUnknownEffectFunction · 0.70
resolveFunction · 0.70
flushMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…