Skip to content

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, BoolTruthy>;

Parameters ​

  • input: Result of E.bool, boolTruthy, etc.

Return value ​

true if the value is an BoolTruthy. Allows refining the type before manipulating the value.

See also ​

Released under the MIT license.