Skip to content

UnionToIntersection

UnionToIntersection<U> = U extends U ? (u) => 0 : never extends (i) => 0 ? Extract<I, U> : never

Defined in: packages/isaacscript-common/src/types/UnionToIntersection.ts:2

Helper type to convert a union to an intersection.

U