Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Intersect

import type { Intersect } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/kind.ts";

A type level utility that turns a type union into a type intersection. This type is dangerous and can have unexpected results so extra runtime testing is necessary when used.

type Intersect<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;

§Type Parameters

§Type

§
(U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never
[src]