import type { DeepMerge, InitOptions, DepthMerge, ShallowMerge, ExtractNullBehavior, MergeAllToDepth } from './types/index.js'; import type { Nullish } from '@toolbox-ts/types'; import type { IntersectElementUnions, WithoutNullish } from '@toolbox-ts/types/defs/tuple'; export type MergeOptions = Omit, 'maxDepth'>; export declare const mergeDeep: = MergeOptions>(current: B | Nullish, next: N | Nullish, opts?: O) => DeepMerge>; export declare const mergeShallow: = MergeOptions>(current: B | Nullish, next: N | Nullish, opts?: O) => ShallowMerge>; export declare const mergeToDepth: = MergeOptions>(current: B | Nullish, next: N | Nullish, depth: D, opts?: O) => DepthMerge, D>; /** * Merges two objects of the same shape to a specified depth (default Infinity). */ export declare function merge(current: D | Nullish, next: D, { depth, ...opts }?: InitOptions & { depth?: number; }): D; export declare function mergeAll(base: B | Nullish, next: [...N], { depth, ...rest }?: InitOptions & { depth?: number; }): B; export declare const mergeAllDeep: >> = MergeOptions>>>(base: B | Nullish, next: [...(N | Nullish[])], opts?: O) => DeepMerge>, ExtractNullBehavior>; export declare const mergeAllShallow: >> = MergeOptions>>>(base: B | Nullish, next: [...(N | Nullish[])], opts?: O) => ShallowMerge>, ExtractNullBehavior>; export declare const mergeAllToDepth: > = MergeOptions>>(base: B | Nullish, next: [...(N | Nullish[])], depth: D, opts?: O) => MergeAllToDepth, D>;