Package: effect
Module: SchemaTransformation
Transforms values by returning the input unchanged in both directions.
When to use
Use when you need a schema transformation to connect two schemas that share the same type with no actual conversion.
Details
T and E must be the same type. Pass { strict: false }
to bypass the type constraint.Example (Chaining schemas with no conversion)
import { Schema, SchemaTransformation } from "effect"
const schema = Schema.Trim.pipe(
Schema.decodeTo(Schema.FiniteFromString, SchemaTransformation.passthrough())
)
See
passthroughSupertypepassthroughSubtypetransformSignature
declare const passthrough: { <T, E>(options: { readonly strict: false; }): Transformation<T, E>; <T>(): Transformation<T, T>; }
Since v4.0.0