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