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

x/deepmergets/dist/deno/types/merging.ts>DeepMergeLeaf

Deeply merge 2 or more objects respecting type information.
Go to Latest
type alias DeepMergeLeaf
import { type DeepMergeLeaf } from "https://deno.land/x/deepmergets@v7.1.0/dist/deno/types/merging.ts";

Get the leaf type from many types that can't be merged.

Type Parameters

Ts extends ReadonlyArray<unknown>
definition: Ts extends readonly [] ? never : Ts extends readonly [infer T] ? T : Ts extends readonly [...infer Rest, infer Tail] ? IsNever<Tail> extends true ? Rest extends ReadonlyArray<unknown> ? DeepMergeLeaf<Rest> : never : Tail : never