ts-type-forge
    Preparing search index...

    Type Alias Skip<N, T>

    Skip: IsFixedLengthList<T> extends true ? Tuple.Skip<N, T> : T

    Skips the first N elements from a readonly array or tuple T. If T is a tuple, it returns a new tuple containing the elements after the first N. If T is a general array, it returns the original array type T.

    Type Parameters

    • N extends number

      The number of elements to skip.

    • T extends readonly unknown[]

      The readonly array or tuple type.

    A new type containing elements after the first N (for tuples) or T (for arrays).

    type SK1 = List.Skip<1, [1, 2, 3]>; // readonly [2, 3]
    type SK2 = List.Skip<3, [1, 2, 3]>; // readonly []
    type SK3 = List.Skip<1, readonly string[]>; // readonly string[]