interface MergeOptions { /** * The function to use for merging arrays. Defaults to concatenating the arrays */ readonly arrayMerge: (x: X, y: Y, options: MergeOptions) => X & Y; /** * The function to use for merging objects. Defaults to merging the objects */ readonly customMerge?: (key: PropertyKey, options?: MergeOptions) => ((x: unknown, y: unknown) => unknown) | undefined; /** * The function to use for determining if a value is mergeable. Defaults to `isMergeableObject`. */ readonly isMergeableObject: (value: unknown) => boolean; /** * Internal hook used to clone values before merging. */ readonly cloneUnlessOtherwiseSpecified: (value: unknown, options: MergeOptions) => unknown; } /** * Recursively merges the properties of two objects together. The source object is merged into the target object, and a new object is returned. The merge is performed recursively, meaning that nested objects and arrays are also merged. The function handles various edge cases, such as merging arrays, handling non-mergeable objects, and preventing prototype pollution. * * @param x - The target object to merge into. * @param y - The source object to merge from. * @param options - Optional configuration for the merge operation, including custom array merging, custom object merging, and a custom function to determine if a value is mergeable. * * @returns A new object that is the result of merging the source object into the target object. */ declare function mergeImpl(x: readonly X[], y: readonly Y[], options?: Partial): (X | Y)[]; declare function mergeImpl(x: Partial, y: Partial, options?: Partial): X & Y; export declare const merge: typeof mergeImpl & { all(array: Partial[], options?: Partial): T; }; export {};