Skip to content

requiredToOptional

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

Defined in: node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/dts/Schema.d.ts:1110

Converts an optional property to a required one through a transformation Type -> Option.

  • decode: 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.

FA

FI

FR

TA

TI

TR

Schema<FA, FI, FR>

Schema<TA, TI, TR>

(fa) => option_.Option<TI>

(o) => FA

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

3.10.0