UNPKG

mesh-fetcher

Version:

A Node.js package for fetching data from multiple APIs with enhanced features.

21 lines (20 loc) 799 B
import { MergeOptions } from '../types'; /** * Deeply merges multiple objects together, with configurable behavior for arrays and other options. * * @template T - The type of the target object * @template U - The type of the source objects * @param {T} target - The target object to merge into * @param {...U[]} sources - The source objects to merge from * @param {MergeOptions} [options] - Options for merge behavior * @returns {T & U} The merged object * * @example * ```typescript * const target = { a: 1, b: { x: 1 } }; * const source = { b: { y: 2 }, c: 3 }; * const merged = mergeObjects(target, source); * // { a: 1, b: { x: 1, y: 2 }, c: 3 } * ``` */ export declare function mergeObjects<T extends object, U extends object>(target: T, ...args: (U | MergeOptions)[]): T & U;