ParametersToIntersection

Hard

Create ParametersToIntersection<T> which converts union of function parameter types to intersection.

Examples:

Input 1: type Result = ParametersToIntersection<(a: { x: number }) | (b: { y: string })>
Output 1: { x: number } & { y: string }
Output
Run your code to see results.