1 | import { IterationOf } from '../Iteration/IterationOf';
|
2 | import { Iteration } from '../Iteration/Iteration';
|
3 | import { Next } from '../Iteration/Next';
|
4 | import { Length } from './Length';
|
5 | import { Pos } from '../Iteration/Pos';
|
6 | import { Cast } from '../Any/Cast';
|
7 | import { List } from './List';
|
8 | import { Naked } from './_Internal';
|
9 | import { Extends } from '../Any/Extends';
|
10 | import { Append } from './Append';
|
11 |
|
12 |
|
13 |
|
14 | declare type __Zip<L extends List, L1 extends List, LN extends List = [], I extends Iteration = IterationOf<0>> = {
|
15 | 0: __Zip<L, L1, Append<LN, [L[Pos<I>], L1[Pos<I>]]>, Next<I>>;
|
16 | 1: LN;
|
17 | }[Extends<Pos<I>, Length<L>>];
|
18 |
|
19 |
|
20 |
|
21 | export declare type _Zip<L extends List, L1 extends List> = __Zip<Naked<L>, L1> extends infer X ? Cast<X, List> : never;
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | export declare type Zip<L extends List, L1 extends List> = L extends unknown ? L1 extends unknown ? _Zip<L, L1> : never : never;
|
32 | export {};
|