Skip to content

TypeAlias.UnionToIntersection

github-actions[bot] edited this page Jul 8, 2026 · 34 revisions

umt / UnionToIntersection

Type Alias: UnionToIntersection<U>

UnionToIntersection<U> = U extends unknown ? (k) => void : never extends (k) => void ? I : never

Defined in: types/logic/unionToIntersection.ts:12

Converts a union type to an intersection type

Type Parameters

U

U

Example

type A = { a: string }
type B = { b: number }
type Union = A | B
type Intersection = UnionToIntersection<Union> // { a: string } & { b: number }

API

Classes

Interfaces

Type Aliases

Variables

Functions

Clone this wiki locally