source: node_modules/ts-toolbelt/out/Object/Path.d.ts@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 890 bytes
Line 
1import { Key } from '../Any/Key';
2import { Cast } from '../Any/Cast';
3import { Extends } from '../Any/Extends';
4import { Iteration } from '../Iteration/Iteration';
5import { IterationOf } from '../Iteration/IterationOf';
6import { Next } from '../Iteration/Next';
7import { Pos } from '../Iteration/Pos';
8import { List } from '../List/List';
9import { Length } from '../List/Length';
10import { At } from '../Any/At';
11/**
12 * @ignore
13 */
14declare 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 * Get in `O` the type of nested properties
20 * @param O to be inspected
21 * @param Path to be followed
22 * @returns [[Any]]
23 * @example
24 * ```ts
25 * ```
26 */
27export declare type Path<O extends any, P extends List<Key>> = _Path<O & {}, P> extends infer X ? Cast<X, any> : never;
28export {};
Note: See TracBrowser for help on using the repository browser.