Typescript: deep keyof of a nested object, with related type
In order to achieve this goal we need to create permutation of all allowed paths. For example: type Structure = { user: { name: string, surname: string } } type BlackMagic<T>= T // user.name | user.surname type Result=BlackMagic<Structure> Problem becomes more interesting with arrays and empty tuples. Tuple, the array with explicit length, should be … Read more