I am trying to convert the property types of any type T
to a tuple containing the types of T
in order.
type A = {
a: string
b: number
c: string
}
type ToArray<T> = [...{[K in keyof T]: T[K]}[keyof T]] // doesn't work...
type ExpectedResult = [string, number, string]
I tried using the spread operator but couldn't get it to work.