Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 606 Bytes

File metadata and controls

43 lines (31 loc) · 606 Bytes

typelab / assertions / IsObjectEmpty

type IsObjectEmpty<T> = _IsTrue<IfObjectEmpty<T, true, false>>;

Checks if a given type T is an Object Empty type.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is an Object Empty type, false otherwise.

Example

type Valid = IsObjectEmpty<{ [x: string]: never }>; // true
type Invalid = IsObjectEmpty<{ a: string }>; // false