I'm currently exploring ways to create a custom type
that will convert the properties of an object from type Vector
to type Array
.
This is what I have so far
type ToArray<T> = {
[P in keyof T]: T[P] extends Vector<any> ? Array<any> : T[P]
}
How can I accurately map the any
type? My goal is to preserve the original generic type.