typelab / assertions / IsVoid
type IsVoid<T> = _IsTrue<IfVoid<T, true, false>>;Checks if a given type T is void.
| Type Parameter | Description |
|---|---|
|
|
The type to be checked. |
true if T is void, false otherwise.
type Valid = IsVoid<void>; // true
type Invalid = IsVoid<string>; // false