vtils

Home > types > IsEmptyArray

IsEmptyArray type

判断 T 是否是空数组。

Signature:

export declare type IsEmptyArray<T> = T extends any[] ? T extends NonEmptyArray<any> ? false : true : false;

References: NonEmptyArray

Example

type X = IsEmptyArray<[]>
// => true