I need to get types from an interface by doing something like below, but I need to do it inside a function. Is there any way to do this using typescript generics?
I need