import { f as Value, k as ExprNode, n as AnyStaticValue, r as ArrayValue, t as StreamValue } from "./shared-B-KhUIgP.js"; type Executor = { executeSync(node: Sync, scope: Scope): AnyStaticValue; executeAsync(node: N, scope: Scope): Promise; }; type Document = { _id?: string; _type?: string; [T: string]: unknown; }; type DereferenceFunction = (obj: { _ref: string; }) => PromiseLike | Document | null | undefined; interface EvaluateOptions { root?: any; dataset?: any; params?: Record; timestamp?: Date; identity?: string; before?: any; after?: any; sanity?: { projectId: string; dataset: string; }; dereference?: DereferenceFunction; } interface Context { timestamp: Date; identity: string; before: Value | null; after: Value | null; sanity?: { projectId: string; dataset: string; }; dereference?: DereferenceFunction; } declare class Scope { params: Record; source: Value; value: Value; parent: Scope | null; context: Context; isHidden: boolean; constructor(params: Record, source: Value, value: Value, context: Context, parent: Scope | null); createNested(value: Value): Scope; createHidden(value: Value): Scope; } /** * Evaluates a query. * @internal */ declare function evaluateQuery(tree: ExprNode, options?: EvaluateOptions): Value | PromiseLike; /** * Evaluates a query synchronously. * * This currently only supports a tiny subset of the GROQ language. * @internal */ declare function evaluateQuerySync(tree: ExprNode, options?: EvaluateOptions): AnyStaticValue; /** @public */ type GroqFunctionArg = ExprNode; /** @public */ type GroqFunction = Executor; type GroqPipeFunction = Executor<{ base: ArrayValue | StreamValue; args: ExprNode[]; }, { base: ArrayValue; args: ExprNode[]; }>; export { evaluateQuerySync as a, DereferenceFunction as c, Executor as d, evaluateQuery as i, Document as l, GroqFunctionArg as n, Scope as o, GroqPipeFunction as r, Context as s, GroqFunction as t, EvaluateOptions as u }; //# sourceMappingURL=evaluator-DI1CHUof.d.ts.map