Skip to content

Intersect

Converts a union into an intersection

Usage

Intersect<{ a: 1 } | { b: 2 }>; // ^? { a: 1 } & { b: 2 }

Installation

Terminal window
npx atmx add type intersect