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

std/collections/mod.ts>Merge

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
type alias Merge
import { type Merge } from "https://deno.land/std@0.217.0/collections/mod.ts";

Merge two objects

Type Parameters

T
U
Options
optional
X =
& (Options extends { sets: "replace"; } ? PartialByType<U, Set<unknown>> : MergeAllSets<T, U>)
& (Options extends { arrays: "replace"; } ? PartialByType<U, Array<unknown>> : MergeAllArrays<T, U>)
& (Options extends { maps: "replace"; } ? PartialByType<U, Map<unknown, unknown>> : MergeAllMaps<T, U>)
definition: ExpandRecursively<X>