Looking at the following code snippet, what type should SomeMagic
be in order to reverse the distributiveness of Y
?
type X<A> = { value: A };
type Y = X<number> | X<string>;
type Z = SomeMagic<Y>; // <-- What type should SomeMagic be to achieve Z as X<number | string>?