/** * @author https://stackoverflow.com/users/2887218/jcalz * @see https://stackoverflow.com/a/50375286/10325032 */ export type UnionToIntersection = ( Union extends any ? (argument: Union) => void : never ) extends (argument: infer Intersection) => void ? Intersection : never