devtypes - v2.0.0
    Preparing search index...

    Type Alias TupleZip<A, B>

    TupleZip: A extends readonly [infer AH, ...(infer AT)]
        ? B extends readonly [infer BH, ...(infer BT)]
            ? readonly [readonly [AH, BH], ...TupleZip<AT, BT>]
            : readonly []
        : readonly []

    Zip two tuples into a tuple of pairs.

    Type Parameters

    • A extends readonly any[]

      First tuple

    • B extends readonly any[]

      Second tuple

    Combines two tuples by pairing elements at corresponding positions. Stops at the shorter tuple length.

    type Z = TupleZip< [ 1, 2 ], [ 'a', 'b', 'c' ] >;
    // [ [ 1, 'a' ], [ 2, 'b' ] ]