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

x/deepmergets/src/types/utils.ts>FlattenTuple

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

Flatten a tuple of tuples into a single tuple.

definition: T extends readonly [] ? [] : T extends readonly [infer T0] ? [...FlattenTuple<T0>] : T extends readonly [infer T0, ...infer Ts] ? [...FlattenTuple<T0>, ...FlattenTuple<Ts>] : [T]