I recently stumbled on the following TypeScript code:
type UnionToIntersection = (U extends any ? (k: U) => void : never) extends ((k: infer I