boolTruthy
Forces the creation of an EitherRight<"bool"> by explicitly marking a truthy value.
Interactive example
Syntax
typescript
function boolTruthy<
const GenericInput extends unknown
>(
input: GenericInput
): EitherBoolTruthy<GenericInput>;Parameters
input: Value considered truthy.
Return value
An EitherRight<"bool", GenericInput> guaranteeing that the Right branch represents the truthy case.
See also
bool– Automatic truthy/falsy conversion.whenIsBoolTruthy– Act only on truthy values.
