UNPKG

@codeparticle/rdx

Version:

RDX is a module based redux framework that generates boilerplate for you.

22 lines (19 loc) 648 B
import { L as List, K as Key, C as Cast, I as Iteration, c as IterationOf, A as At, P as Pos, N as Next, E as Extends, d as Length } from './_Internal.d-b77d7bab'; /** * @ignore */ declare type _Path<O, P extends List<Key>, I extends Iteration = IterationOf<0>> = { 0: _Path<At<O, P[Pos<I>]>, P, Next<I>>; 1: O; }[Extends<Pos<I>, Length<P>>]; /** * Get in `O` the type of nested properties * @param O to be inspected * @param Path to be followed * @returns [[Any]] * @example * ```ts * ``` */ declare type Path<O extends any, P extends List<Key>> = _Path<O & {}, P> extends infer X ? Cast<X, any> : never; export { Path as P };