Skip to content

boolFalsy

Construit un EitherLeft<"bool"> pour une valeur explicitement falsy (0, "", null, undefined, false).

Exemple interactif

Syntaxe

typescript
function boolFalsy<
	const GenericInput extends BoolFalsyValue = undefined
>(
  input?: GenericInput
): EitherBoolFalsy<GenericInput>;

Paramètres

  • input : Valeur falsy (optionnelle).

Valeur de retour

Un EitherLeft<"bool", GenericInput> permettant de représenter un faux explicite.

Voir aussi

  • bool – Conversion truthy/falsy automatique.
  • whenIsBoolFalsy – Pour déclencher une action sur les falsy.

Diffusé sous licence MIT.