UNPKG

@tmlmobilidade/utils

Version:

A collection of utility functions and helpers for the TML Mobilidade Go monorepo, providing common functionality for batching operations, caching, HTTP requests, object manipulation, permissions, and more.

22 lines (21 loc) 589 B
/** * Merges two objects or arrays. * @param target - The target object or array. * @param source - The source object or array. * @returns The merged object or array. * * @example * const target = { a: 1, b: 2 }; * const source = { b: 3, c: 4 }; * const merged = mergeObjects(target, source); * // merged will be: * // { a: 1, b: 3, c: 4 } * * @example * const target = [1, 2, 3]; * const source = [4, 5, 6]; * const merged = mergeObjects(target, source); * // merged will be: * // [1, 2, 3, 4, 5, 6] */ export declare function mergeObjects<T>(target: T, source: T): T;