ts-type-forge
    Preparing search index...

    Type Alias IsNotFixedLengthList<T>

    IsNotFixedLengthList: number extends T["length"] ? true : false

    Checks if a given readonly array type T does not have a fixed length (i.e., is a regular array). Returns true if T is a regular array (Type[]), false if it's a tuple. This is the logical negation of IsFixedLengthList.

    Type Parameters

    • T extends readonly unknown[]

      The readonly array or tuple type to check.

    true if T is a regular array (not fixed length), false otherwise.

    type IsNotTuple = IsNotFixedLengthList<[1, 2, 3]>; // false
    type IsNotArray = IsNotFixedLengthList<number[]>; // true
    type IsNotReadonlyArray = IsNotFixedLengthList<readonly string[]>; // true
    type IsNotEmptyTuple = IsNotFixedLengthList<[]>; // false
    type IsNotTupleWithRest = IsNotFixedLengthList<[number, ...string[]]>; // true