Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 665 Bytes

File metadata and controls

44 lines (32 loc) · 665 Bytes

typelab / assertions / IsTupleWritable

type IsTupleWritable<T> = _IsTrue<IfTupleWritable<T, true, false>>;

Checks if a given type T is not readonly Tuple type.

Type Parameters

Type Parameter Description

T

The type to be checked.

Returns

true if T is not readonly Tuple type, false otherwise.

Example

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