/**
 * Perform a topological union (dissolve) operation on 2D geometries.
 *
 * ![Union operator](https://developers.arcgis.com/javascript/latest/assets/img/apiref/operators/union.png "Union operator")
 *
 * @since 4.31
 */
import type { GeometryUnion, GeometryWithoutMeshUnion } from "../types.js";

/**
 * Perform a topological union operation on two geometries.
 *
 * @param geometry1 - The first geometry to union with.
 * @param geometry2 - The second geometry to union with.
 * @returns Returns the union of the two geometries as a geometry or null.
 * @example
 * // Return the union of two polygons
 * const union = unionOperator.execute(polygon1, polygon2);
 */
export function execute(geometry1: GeometryUnion, geometry2: GeometryUnion): GeometryWithoutMeshUnion | null | undefined;

/**
 * Perform a topological union operation on a geometry set.
 *
 * @param geometries - The array of geometries to union.
 * All the geometries must have the same spatial reference.
 * @returns Returns the union of `geometries` as a geometry or null.
 */
export function executeMany(geometries: GeometryUnion[]): GeometryWithoutMeshUnion | null | undefined;

/**
 * Indicates if the operator supports input geometries that contain curves.
 * The value will always be `true`.
 */
export const supportsCurves: boolean;