Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 666 Bytes

File metadata and controls

44 lines (32 loc) · 666 Bytes

typelab / assertions / IsTupleReadonly

type IsTupleReadonly<T> = _IsTrue<IfTupleReadonly<T, true, false>>;

Checks if a given type T is readonly Tuple type.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is readonly Tuple type, false otherwise.

Example

type Valid = IsTupleReadonly<readonly [string]>; // true
type Invalid1 = IsTupleReadonly<[string]>; // false
type Invalid2 = IsTupleReadonly<readonly string[]>; // false