typedash
Version:
modern, type-safe collection of utility functions
20 lines (19 loc) • 762 B
TypeScript
import { TypedArray } from "type-fest";
//#region src/functions/zip/zip.d.ts
/**
* Zips two arrays together into an array of tuples.
* @param first The first array to zip.
* @param second The second array to zip.
* @returns An array of tuples containing the zipped values.
*/
declare function zip<T, U>(first: readonly T[], second: readonly U[]): [T, U][];
/**
* Zips two typed arrays together into an array of tuples.
* @param first The first array to zip.
* @param second The second array to zip.
* @returns An array of tuples containing the zipped values.
*/
declare function zip<T extends TypedArray, U extends TypedArray>(first: T, second: U): [T[number], U[number]][];
//#endregion
export { zip as t };
//# sourceMappingURL=zip-DPduyMfo.d.ts.map