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

x/tsafe/UnionToIntersection.ts

🔩 The missing TypeScript utils
Go to Latest
File
/* eslint-disable @typescript-eslint/no-explicit-any */
/** @see <https://docs.tsafe.dev/> **/export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ( k: infer I,) => void ? I : never;