feature: vor und nachteile

This commit is contained in:
Hikyu
2026-05-31 13:54:31 +02:00
parent 552a947a1c
commit e3dad17446
23270 changed files with 3024794 additions and 200 deletions
+18
View File
@@ -0,0 +1,18 @@
//#region src/array/unzip.d.ts
/**
* Gathers elements in the same position in an internal array
* from a grouped array of elements and returns them as a new array.
*
* @template T - The type of elements in the nested array.
* @param {Array<[...T]>} zipped - The nested array to unzip.
* @returns {Unzip<T>} A new array of unzipped elements.
*
* @example
* const zipped = [['a', true, 1],['b', false, 2]];
* const result = unzip(zipped);
* // result will be [['a', 'b'], [true, false], [1, 2]]
*/
declare function unzip<T extends unknown[]>(zipped: ReadonlyArray<[...T]>): Unzip<T>;
type Unzip<K extends unknown[]> = { [I in keyof K]: Array<K[I]> };
//#endregion
export { unzip };