import ComplexQuery, { ComplexQueryOptions } from './ComplexQuery.js'; import './api/ComplexQueryLang.js'; import '@arcgis/core/geometry/Geometry'; /** * SpatialQuery registers and implements all SpatialOperators using the geometry engine of the esri js api. * @example * ```ts * // This import ensures, that a ComplexQuery knows about the spatial operators. * import SpatialQuery from "store-api/SpatialQuery"; * * const testGeom = {}; * const query = { geometry: { $intersects: testGeom } }; * const options = {}; * if (SpatialQuery.isSpatialQuery(query, options)) { * const complexQuery = SpatialQuery.parse(query, options); * // ... * } * ``` */ type SpatialQueryType = (typeof ComplexQuery) & SpatialQueryExtension; /** * The SpatialQueryExtension extends the 'ComplexQuery' with static helper methods. */ interface SpatialQueryExtension { /** * Test if a complex query contains spatial operators. */ isSpatialQuery(query: any, queryOptions: ComplexQueryOptions): boolean; } /** reexports ComplexQuery with spatial operators */ declare const SpatialQuery: SpatialQueryType; export { SpatialQuery, SpatialQuery as default }; export type { SpatialQueryExtension, SpatialQueryType };