import { KeysOfUnion, SharedUnionFields, Simplify, EmptyObject, Merge } from 'type-fest'; import { I as IterableContainer } from './IterableContainer-CtfinwiH.cjs'; import { N as NonEmptyArray } from './NonEmptyArray-C9Od1wmF.cjs'; import { T as TupleParts } from './TupleParts-CP0H7BrE.cjs'; /** * Gets the set of keys that are not shared by all members of a union. This is the complement of the keys of {@link SharedUnionFields}. */ type DisjointUnionFieldKeys = Exclude, keyof SharedUnionFields>; /** * Gets the set of fields that are not shared by all members of a union. This is the complement of {@link SharedUnionFields}. */ type DisjointUnionFields = { [K in DisjointUnionFieldKeys]: T extends Partial> ? T[K] : never; }; /** * Merge a tuple of object types, where props from later objects override earlier props. */ type MergeTuple = T extends readonly [infer Head, ...infer Rest] ? MergeTuple> : Result; type MergeUnion = Simplify & Partial>>; type MergeAll> = TupleParts extends { item: never; } ? T extends readonly [] ? EmptyObject : MergeTuple : MergeUnion | EmptyObject; /** * Merges a list of objects into a single object. * * @param objects - The array of objects. * @returns A new object merged with all of the objects in the list. If the list is empty, an empty object is returned. * @signature * R.mergeAll(objects) * @example * R.mergeAll([{ a: 1, b: 1 }, { b: 2, c: 3 }, { d: 10 }]) // => { a: 1, b: 2, c: 3, d: 10 } * R.mergeAll([]) // => {} * @dataFirst * @category Array */ declare function mergeAll(objects: Readonly>): MergeUnion; declare function mergeAll>(objects: T): MergeAll; export { mergeAll };