Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 541 Bytes

File metadata and controls

43 lines (31 loc) · 541 Bytes

typelab / assertions / IsArray

type IsArray<T> = _IsTrue<IfArray<T, true, false>>;

Checks if a given type T is an Array type.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is an Array type, false otherwise.

Example

type Valid = IsArray<string[]>; // true
type Invalid = IsArray<string>; // false