Package: effect
Module: SchemaGetter
Returns the identity getter, typed for when the encoded type E is a subtype of T.
When to use
Use when you need a schema getter that passes values through without
{ strict: false } for an encoded type that narrows the decoded type.
Details
passthrough — no allocation, optimized in composition.Example (Passing through subtypes)
import { SchemaGetter } from "effect"
// "hello" extends string, so E extends T
const g = SchemaGetter.passthroughSubtype<string, "hello">()
See
passthrough when types are identicalpassthroughSupertype when T extends ESignature
declare const passthroughSubtype: <T, E extends T>() => Getter<T, E>
Since v4.0.0