transformOrFail
Create a new Schema
by transforming the input and output of an existing Schema
using the provided decoding functions.
Since
3.10.0
Call Signature
transformOrFail<
To
,From
,RD
,RE
>(to
,options
): (from
) =>transformOrFail
<From
,To
,RD
|RE
>
Defined in: node_modules/.pnpm/effect@3.14.8/node_modules/effect/dist/dts/Schema.d.ts:1955
Create a new Schema
by transforming the input and output of an existing Schema
using the provided decoding functions.
Type Parameters
• To extends Any
• From extends Any
• RD
• RE
Parameters
to
To
options
{ decode
: (fromA
, options
, ast
, fromI
) => Effect
<Encoded
<To
>, ParseIssue
, RD
>; encode
: (toI
, options
, ast
, toA
) => Effect
<Type
<From
>, ParseIssue
, RE
>; strict
: true
; } | { decode
: (fromA
, options
, ast
, fromI
) => Effect
<unknown
, ParseIssue
, RD
>; encode
: (toI
, options
, ast
, toA
) => Effect
<unknown
, ParseIssue
, RE
>; strict
: false
; }
Returns
Function
Parameters
from
From
Returns
transformOrFail
<From
, To
, RD
| RE
>
Since
3.10.0
Since
3.10.0
Call Signature
transformOrFail<
To
,From
,RD
,RE
>(from
,to
,options
):transformOrFail
<From
,To
,RD
|RE
>
Defined in: node_modules/.pnpm/effect@3.14.8/node_modules/effect/dist/dts/Schema.d.ts:1971
Create a new Schema
by transforming the input and output of an existing Schema
using the provided decoding functions.
Type Parameters
• To extends Any
• From extends Any
• RD
• RE
Parameters
from
From
to
To
options
{ decode
: (fromA
, options
, ast
, fromI
) => Effect
<Encoded
<To
>, ParseIssue
, RD
>; encode
: (toI
, options
, ast
, toA
) => Effect
<Type
<From
>, ParseIssue
, RE
>; strict
: true
; } | { decode
: (fromA
, options
, ast
, fromI
) => Effect
<unknown
, ParseIssue
, RD
>; encode
: (toI
, options
, ast
, toA
) => Effect
<unknown
, ParseIssue
, RE
>; strict
: false
; }
Returns
transformOrFail
<From
, To
, RD
| RE
>
Since
3.10.0
Since
3.10.0