Aller au contenu principal

fromNullableK()

fromNullableK<A, B>(f): (...a) => Option<NonNullable<B>>

Lifts a function that may return null/undefined to return an Option.


Type Parameters

A: A extends readonly unknown[]

The argument types.

B: B

The return type.


Parameters

f: (...a) => Nullish<B>

The function to lift.


Returns

A lifted function that returns an Option.


Since

2.0.0