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