ParametersToIntersection
СложнаяСоздайте ParametersToIntersection<T>, который преобразует union типов параметров функции в intersection.
TypeScript•UTF-8
Run your code to see results.
Click the Run button above
ParametersToIntersection
СложнаяСоздайте ParametersToIntersection<T>, который преобразует union типов параметров функции в intersection.
Примеры:
Input 1: type Result = ParametersToIntersection<(a: { x: number }) | (b: { y: string })>
Output 1: { x: number } & { y: string }
Output
Run your code to see results.