Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/arktype/utils/generics.ts>xor

TypeScript's 1:1 validator, optimized from editor to runtime
Latest
type alias xor
import { type xor } from "https://deno.land/x/arktype@v1.0.10-alpha/utils/generics.ts";

Either: A, with all properties of B undefined OR B, with all properties of A undefined

definition: evaluate<a & [k in keyof b]?: undefined> | evaluate<b & [k in keyof a]?: undefined>