How to implement a TypeScript generic type for nested properties that resolves to their types?
Advertisements How to create a generic type that resolves to the type of a nested property Say I have a configuration type type Config = { parent: { child: boolean } } I would like something similar to type ChildConfigType = NestedType<Config, ‘parent.child’> // boolean type ParentConfigType = NestedType<Config, ‘parent’> // {child: boolean} I have… Read More How to implement a TypeScript generic type for nested properties that resolves to their types?