Type alias IsArray<T>

IsArray<T>: IfExtends<T, unknown[], true, false>

Is a given type T an array?

Type Parameters

  • T

Returns

true if T it is, otherwise false.

Example

IsArray<number[]>; // true
IsArray<string>; // false