Package: effect
Module: SchemaTransformation
Transforms values without changing them, typed so that T extends E, where the decoded
type T is a subtype of the encoded type E.
When to use
Use when you need a no-op schema transformation whose decoded side is narrower than the encoded side.
Details
Both decode and encode are no-ops and return a shared singleton transformation.
Example (Passing through supertypes)
import { SchemaTransformation } from "effect"
const t = SchemaTransformation.passthroughSupertype<"a" | "b", string>()
See
passthroughpassthroughSubtypeSignature
declare const passthroughSupertype: <T extends E, E>() => Transformation<T, E>
Since v4.0.0