- transform<C, D, B>(to, decode, encode): (<A>(self) => Schema<A, D>)
Parameters
decode: ((b, options, ast) => C)
- (b, options, ast): C
Returns C
encode: ((c, options, ast) => B)
- (c, options, ast): B
Returns B
Returns (<A>(self) => Schema<A, D>)
- transform<C, D, B>(to, decode, encode, options): (<A>(self) => Schema<A, D>)
Parameters
decode: ((b, options, ast) => unknown)
- (b, options, ast): unknown
Returns unknown
encode: ((c, options, ast) => unknown)
- (c, options, ast): unknown
Returns unknown
options: {
strict: false;
}
Returns (<A>(self) => Schema<A, D>)
- transform<A, B, C, D>(from, to, decode, encode): Schema<A, D>
Parameters
decode: ((b, options, ast) => C)
- (b, options, ast): C
Returns C
encode: ((c, options, ast) => B)
- (c, options, ast): B
Returns B
Returns Schema<A, D>
- transform<A, B, C, D>(from, to, decode, encode, options): Schema<A, D>
Parameters
decode: ((b, options, ast) => unknown)
- (b, options, ast): unknown
Returns unknown
encode: ((c, options, ast) => unknown)
- (c, options, ast): unknown
Returns unknown
options: {
strict: false;
}
Returns Schema<A, D>
Create a new
Schema
by transforming the input and output of an existingSchema
using the provided mapping functions.