UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

7 lines (6 loc) 190 B
/** Helper type to convert a union to an intersection. */ export type UnionToIntersection<U> = ( U extends U ? (u: U) => 0 : never ) extends (i: infer I) => 0 ? Extract<I, U> : never;