nullable
Wraps a null or non-null value in an Either, while keeping the information on whether it is filled or empty.
Interactive example
Syntax
typescript
function nullable<
const GenericInput extends unknown = null
>(
input: GenericInput
): GenericInput extends null
? NullableEmpty
: NullableFilled<GenericInput>;Parameters
input: Can benullor a concrete value.
Return value
NullableFilledif the value exists.NullableEmptyifnull.
