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