boolFalsy
Builds an EitherLeft<"bool"> for an explicitly falsy value (0, "", null, undefined, false).
Interactive example
Syntax
typescript
function boolFalsy<
const GenericInput extends BoolFalsyValue = undefined
>(
input?: GenericInput
): EitherBoolFalsy<GenericInput>;Parameters
input: Falsy value (optional).
Return value
An EitherLeft<"bool", GenericInput> allowing you to represent an explicit false.
See also
bool– Automatic truthy/falsy conversion.whenIsBoolFalsy– To trigger an action on falsy values.
