Type declaration
custom:function
- custom<T>(
__namedParameters: {
decode: (value: unknown) => functional.Either<string, T>;
encode: (value: T) => any;
schema?: () => object;
},
): functional.Codec<T> Parameters
- __namedParameters: {
decode: (value: unknown) => functional.Either<string, T>;
encode: (value: T) => any;
schema?: () => object;
}
interface:function
Creates a codec for any type, you can add your own deserialization/validation logic in the decode argument