Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
type alias ObjectXorKeys
import { type ObjectXorKeys } from "https://deno.land/std@0.217.0/collections/mod.ts";

Object with keys in either T or U but not in both

Type Parameters

T
U
optional
X = Omit<T, keyof U> & Omit<U, keyof T>
optional
Y = [K in keyof X]: X[K]
definition: Y