UnionKeys type

Every key declared by any member of the union T.

type UnionKeys<T> = T extends unknown ? keyof T : never