//#region src/Array/union.d.ts /** * # union * * ```ts * function Array.union( * target: readonly T[], * source: Iterable>, * ): readonly T[] * ``` * * Returns a new array containing all unique elements from both `target` and `source`. Elements from `source` that are not already in `target` are added to the result. * * ## Example * * ```ts [data-first] * import { Array } from "@monstermann/array"; * * Array.union([1, 2, 3], [3, 4, 5]); // [1, 2, 3, 4, 5] * ``` * * ```ts [data-last] * import { Array } from "@monstermann/array"; * * pipe([1, 2, 3], Array.union([3, 4, 5])); // [1, 2, 3, 4, 5] * ``` * */ declare const union: { (source: Iterable>): (target: T[]) => T[]; (source: Iterable>): (target: readonly T[]) => readonly T[]; (target: T[], source: Iterable>): T[]; (target: readonly T[], source: Iterable>): readonly T[]; }; //#endregion export { union };