Skip to content

isBoolTruthy ​

Type guard qui vérifie si un Either issu des helpers booléens est truthy.

Exemple interactif ​

Syntaxe ​

typescript
function isBoolTruthy<
	GenericInput extends unknown
>(
  input: GenericInput
): input is Extract<GenericInput, BoolTruthy>;

Paramètres ​

  • input : Résultat de E.bool, boolTruthy, etc.

Valeur de retour ​

true si la valeur est un BoolTruthy. Permet de raffiner le type avant de manipuler la valeur.

Voir aussi ​

Diffusé sous licence MIT.