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