import type { ProgramNode } from "./ast.js"; export type JsonValue = boolean | null | number | string | JsonValue[] | { [key: string]: JsonValue; }; export type PathSegment = number | string; export type QueryPath = PathSegment[]; export interface QueryEntry { value: JsonValue; path: QueryPath | null; } export interface EvaluationOptions { functions?: Record; params?: Record; reducers?: Record; } export type AsterQLFunction = (args: JsonValue[], context: FunctionContext) => JsonValue; export type AsterQLReducer = (values: Iterable, context: ReducerContext) => JsonValue; export interface FunctionContext { current: JsonValue; params: Record; root: JsonValue; } export interface ReducerContext { args: JsonValue[]; params: Record; } export interface CompiledQuery { ast: ProgramNode; evaluate(data: unknown, options?: EvaluationOptions): JsonValue; query(data: unknown, options?: EvaluationOptions): Iterable; } export declare function query(data: unknown, queryOrAst: ProgramNode | string, options?: EvaluationOptions): Iterable; export declare function evaluate(data: unknown, queryOrAst: ProgramNode | string, options?: EvaluationOptions): JsonValue; export declare function compile(source: string): CompiledQuery; //# sourceMappingURL=runtime.d.ts.map