Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/ts_essentials/lib/mod.ts>XOR

All basic TypeScript types in one place 🤙
Latest
type alias XOR
import { type XOR } from "https://deno.land/x/ts_essentials@v9.1.2/lib/mod.ts";

get the XOR type which could make 2 types exclude each other

definition: T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U