Skip to content

optionalToOptional

optionalToOptional<FA, FI, FR, TA, TI, TR>(from, to, options): PropertySignature<"?:", TA, never, "?:", FI, false, FR | TR>

Defined in: node_modules/.pnpm/effect@3.14.8/node_modules/effect/dist/dts/Schema.d.ts:1127

Converts an optional property to another optional property through a transformation Option -> Option.

  • decode:
    • none as argument means the value is missing in the input.
    • none as return value means the value will be missing in the output.
  • encode:
    • none as argument means the value is missing in the input.
    • none as return value means the value will be missing in the output.

Type Parameters

FA

FI

FR

TA

TI

TR

Parameters

from

Schema<FA, FI, FR>

to

Schema<TA, TI, TR>

options

decode

(o) => Option<TI>

encode

(o) => Option<FA>

Returns

PropertySignature<"?:", TA, never, "?:", FI, false, FR | TR>

Since

3.10.0