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

x/deepmergets/dist/deno/types/utils.ts>TuplifyUnion

Deeply merge 2 or more objects respecting type information.
Latest
type alias TuplifyUnion
import { type TuplifyUnion } from "https://deno.land/x/deepmergets@v7.0.3/dist/deno/types/utils.ts";

Convert a union to a tuple.

Warning: The order of the elements is non-deterministic. Warning 2: The union maybe me modified by the TypeScript engine before convertion. Warning 3: This implementation relies on a hack/limitation in TypeScript.

Type Parameters

T
optional
L = LastOf<T>
definition: IsNever<T> extends true ? [] : [...TuplifyUnion<Exclude<T, L>>, L]