ts-type-forge
    Preparing search index...

    Type Alias Skip<N, T>

    Skip: SkipImpl<N, T, readonly []>

    Skips the first N elements from a readonly tuple T.

    Type Parameters

    • N extends number

      The number of elements to skip (must be a non-negative integer literal).

    • T extends readonly unknown[]

      The readonly tuple type.

    A new readonly tuple type containing the elements after the first N. If N is larger than the length of T, returns readonly [].

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