If I have...
type TypeNonGeneric = { prop1: any, prop2: string };
How can I map this to...
type TypeGeneric<T> = { prop1: T, prop2: string };
I've looked at the docs and it seems that it needs to be a new generic type that would take TypeNonGeneric
as a parameter, iterate over its keys and if a property type is any
then it returns a "T" else leaves the type unchanged.