Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 604 Bytes

File metadata and controls

43 lines (31 loc) · 604 Bytes

typelab / assertions / IsArrayReadonly

type IsArrayReadonly<T> = _IsTrue<IfArrayReadonly<T, true, false>>;

Checks if a given type T is readonly Array type.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is readonly Array type, false otherwise.

Example

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