1 | import { Key } from '../Any/Key';
|
2 | import { Cast } from '../Any/Cast';
|
3 | import { Extends } from '../Any/Extends';
|
4 | import { Iteration } from '../Iteration/Iteration';
|
5 | import { IterationOf } from '../Iteration/IterationOf';
|
6 | import { Next } from '../Iteration/Next';
|
7 | import { Pos } from '../Iteration/Pos';
|
8 | import { List } from '../List/List';
|
9 | import { Length } from '../List/Length';
|
10 | import { At } from '../Any/At';
|
11 |
|
12 |
|
13 |
|
14 | declare type _Path<O, P extends List<Key>, I extends Iteration = IterationOf<0>> = {
|
15 | 0: _Path<At<O, P[Pos<I>]>, P, Next<I>>;
|
16 | 1: O;
|
17 | }[Extends<Pos<I>, Length<P>>];
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | export declare type Path<O extends any, P extends List<Key>> = _Path<O & {}, P> extends infer X ? Cast<X, any> : never;
|
28 | export {};
|