typelab / assertions / IsObjectEmpty
type IsObjectEmpty<T> = _IsTrue<IfObjectEmpty<T, true, false>>;Checks if a given type T is an Object Empty type.
| Type Parameter | Description |
|---|---|
|
|
The type to be checked. |
true if T is an Object Empty type, false otherwise.
type Valid = IsObjectEmpty<{ [x: string]: never }>; // true
type Invalid = IsObjectEmpty<{ a: string }>; // false