@epikodelabs/actionstack / ValueAtPath
Type Alias: ValueAtPath<T, P>
ValueAtPath<
T,P> =Pextends readonly [] ?T:Pextends readonly [infer K,...(infer Rest)] ?Kextends keyofT?ValueAtPath<T[K],Extract<Rest, readonlyany[]>> :unknown:unknown
Defined in: selectors.ts:27
Recursively resolves the type of a deeply nested property based on a path array.
- [] -> T
- ['a'] -> T['a']
- ['a','b'] -> T['a']['b']
Type Parameters
T
T
P
P extends readonly any[]