Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 573 Bytes

File metadata and controls

25 lines (16 loc) · 573 Bytes

Home > types-kit > IsEmptyTypeArray

IsEmptyTypeArray type

If T is a empty array, return true, else return false.

Signature:

export type IsEmptyTypeArray<T extends readonly unknown[]> = T extends T
  ? IsExtends<T['length'], 0>
  : never

References: IsExtends

Example

// Expect: true
type Foo = IsEmptyTypeArray<[]>