import type EsriMap from "@arcgis/core/Map";
import type SpatialReference from "@arcgis/core/geometry/SpatialReference";
import type Layer from "@arcgis/core/layers/Layer";
import type Sublayer from "@arcgis/core/layers/support/Sublayer";
import type { Feature } from "../data/Feature.js";
/**
 * Parameters for the {@link runArcadeExpression} and
 * {@link runAsyncArcadeExpression} functions.
 */
export interface RunArcadeExpressionParams {
    /**
     * Optional only required when the script references the "$map", "$layer" or
     * "$datastore" variables.
     */
    spatialReference?: SpatialReference;
    /**
     * Optional only required when the script references the "$feature"
     * variable.
     */
    feature?: Feature;
    /**
     * Optional only required when the script references the "$map" variable.
     */
    map?: EsriMap;
    /**
     * Optional only required when the script references the "$layer" or
     * "$datastore" variable.
     */
    layer?: Layer | Sublayer;
    /**
     * Additional Arcade arguments to attach to the script when run.
     */
    vars?: Record<string, unknown>;
    /**
     * Emit an error when the script is missing referenced variables. Defaults
     * to 'true'.
     */
    emitErrorOnMissingVariables?: boolean;
}
/**
 * Detect if the arcade expression requires an async evaluation.
 *
 * @param expression The Arcade expression string.
 * @param spatialReference Optionally the spatial reference for the expressions.
 */
export declare function isArcadeScriptAsync(expression: string, spatialReference?: SpatialReference): boolean;
/**
 * Execute an synchronous arcade expression string, and return the unformatted
 * result. You must call 'enableGeometrySupport' prior to evaluating any
 * expressions that might require the geometry engine.
 *
 * @param expression The arcade expression string.
 * @param params The parameters.
 */
export declare function runArcadeExpression(expression: string, params: RunArcadeExpressionParams): unknown;
/**
 * Execute an asynchronous arcade expression string, and return the unformatted
 * result.
 *
 * @param expression The arcade expression string.
 * @param params The parameters.
 */
export declare function runAsyncArcadeExpression(expression: string, params: RunArcadeExpressionParams): Promise<unknown>;
