Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/live/deps.ts>UnionToIntersection

Open-Source web editor based on Preact, Tailwind and TypeScript. The other side of code.
Go to Latest
type alias UnionToIntersection
import { type UnionToIntersection } from "https://deno.land/x/live@1.56.1/deps.ts";

UnionToIntersection

Examples

// Expect: { name: string } & { age: number } & { visible: boolean } UnionToIntersection<{ name: string } | { age: number } | { visible: boolean }>

definition: (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never