isBoolTruthy
Type guard that checks whether an Either from the boolean helpers is truthy.
Interactive example
Syntax
typescript
function isBoolTruthy<
GenericInput extends unknown
>(
input: GenericInput
): input is Extract<GenericInput, EitherBoolTruthy>;Parameters
input: Result ofE.bool,boolTruthy, etc.
Return value
true if the value is an EitherBoolTruthy. Allows refining the type before manipulating the value.
See also
whenIsBoolTruthy– Functional version.isBoolFalsy– Falsy counterpart.
