typelab / assertions / IsFalsy
type IsFalsy<T> = _IsTrue<IfFalsy<T, true, false>>;Checks if a given type T is `Falsy`.
| Type Parameter | Description |
|---|---|
|
|
The type to be checked. |
true if T is `Falsy`, false otherwise.
type Valid = IsFalsy<false | '' | 0 | 0n | null | undefined | void>; // true
type Invalid = IsFalsy<0 | 1>; // false