vtils

Home > types > IsEmptyObject

IsEmptyObject type

判断 T 是否是空对象。

Signature:

export declare type IsEmptyObject<T> = T extends Object ? IsNever<keyof T> : false;

References: IsNever

Example

type X = IsEmptyObject<{}>
// => true