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

x/deco/deps.ts>UnionToIntersection

Git-based Visual CMS for Deno, </> htmx and Tailwind apps. Deploy on any Deno-compatible host.
Go to Latest
type alias UnionToIntersection
import { type UnionToIntersection } from "https://deno.land/x/deco@1.75.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