Extract all keys from a union of object types.
Union of object types
Produces the union of keys that appear in at least one member of the union.
type U = { a: string } | { b: number };type K = UnionKeys< U >; // 'a' | 'b' Copy
type U = { a: string } | { b: number };type K = UnionKeys< U >; // 'a' | 'b'
Extract all keys from a union of object types.