main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[d24f17c] | 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 | * @hidden
|
---|
| 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 | * @hidden
|
---|
| 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 | * Pair up the entries of `L` with `L1`
|
---|
| 24 | * @param L to pair up
|
---|
| 25 | * @param L1 to pair up with
|
---|
| 26 | * @returns [[List]]
|
---|
| 27 | * @example
|
---|
| 28 | * ```ts
|
---|
| 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 {};
|
---|
Note:
See
TracBrowser
for help on using the repository browser.