I have a union of Parameters:
type Params = [{ name: string }] | [{ x: number, y: number } | ...];
I want to concat every tuple in the union (independently from the number of tuples in the union) and get a result like the following:
type ParamsJoined = [{ name: string, x: number, y: number, ... }];
I can't use tricks like const since the type Params is created dynamically using Parameters and distributive conditional types on a union of functions.
How can I do it?