Package: effect
Module: SchemaGetter
Creates a getter that always produces the given constant value, ignoring the input.
When to use
Use when you need a schema getter that always decodes a field to a fixed value.
Details
The getter is pure and always returns Option.some(t) regardless of whether
the input is Some or None.
Example (Returning a constant getter)
import { SchemaGetter } from "effect"
const alwaysZero = SchemaGetter.succeed(0)
// alwaysZero: Getter<0, unknown> — always produces 0
See
transform when you need to use the input valuepassthrough when you want to keep the input as-isSignature
declare const succeed: <const T, E>(t: T) => Getter<T, E>
Since v4.0.0