import { type JqOptions } from './types.ts'; /** * Report whether a jq program calls the `inputs` builtin. * * Binding the remaining documents is what makes `inputs` work, and it also * makes the program run once over the whole stream instead of once per * document, so only the builtin may answer here: the word also spells a * field (`.inputs`, `{inputs}`), a variable (`$inputs`), an object key * (`{inputs: 1}`), a module member (`m::inputs`), and anything at all * inside a string or a comment, none of which change how the stream is * read. */ export declare function referencesInputs(expr: string): boolean; /** Report whether a jq program reads the `$ARGS` variable. */ export declare function referencesArgs(expr: string): boolean; /** The value `$ARGS` resolves to for a run. */ export declare function argsObject(opts: JqOptions): Record; /** * The `[path, leaf]` events `--stream` reads a document as. * * jq's own `tostream` emits exactly the events `--stream` produces for a * complete document; the two differ only for input too truncated to * parse, which never reaches here because mirage reads whole values. */ export declare function streamEvents(doc: unknown): Promise; /** * Evaluate a jq expression against obj. * * A jq program is a stream transformer: it emits zero, one or many values, * and jq prints each on its own line. That arity is preserved here rather * than collapsed, so two outputs are never confused with one output that * happens to be an array. `.a, .b` yields two values; `[.a, .b]` yields one. * * Returns every output value, in order. Empty when the program produces no * output at all, which real jq reports as exit 0 with empty stdout. * * `namedArgs` are the $name bindings from --arg / --argjson. `inputs` are * the documents the `inputs` builtin should yield, i.e. the ones still * unread at this point in the stream: this evaluator is handed one value * at a time and owns no input stream, so `inputs` is bound as a * definition over a named argument instead. A user program that defines * its own `inputs` shadows it, as it would shadow the builtin. */ export declare function jqEval(obj: unknown, expr: string, namedArgs?: Readonly>, inputs?: readonly unknown[] | null, argsValue?: Readonly> | null): Promise; //# sourceMappingURL=eval.d.ts.map