Skip to content

deepMerge

@tsed/core

Usage

typescript
import { deepMerge } from "@tsed/core";

See /packages/core/src/utils/deepMerge.ts.

Overview

ts
function deepMerge<T = any, C = any>(source: T & any, obj: C & any, options?: DeepMergeOptions): (T & C) | undefined | null;

Description

Deeply merges two values, combining objects recursively and handling arrays with custom reducers.

Supports primitives, arrays, and objects. Can clean undefined properties and apply custom transformations.

Released under the MIT License.