koSakano/type-challenges

55 - Union to Intersection

Opened this issue · 0 comments

type UnionToIntersection<U> = (U extends any ? (arg: U) => any : never) extends ((arg: infer I) => void) ? I : never;