import { FlagView } from '../../spec/types.ts'; import { type JqOptions } from '../../../core/jq/index.ts'; import { PathSpec } from '../../../types.ts'; import type { CommandFnResult, CommandOpts } from '../../config.ts'; type Stream = (p: PathSpec) => AsyncIterable; /** Collect the $name bindings from --arg and --argjson. */ export declare function namedArgs(fl: FlagView): Record; /** * Values `$ARGS.positional` reports, from --args / --jsonargs. * * The operands after the program stop being input files once either flag * appears, so they arrive here as ordinary text. */ export declare function positionalArgs(fl: FlagView, texts: readonly string[], hasProgramFile: boolean): unknown[]; /** * Read the raw jq flag kwargs into a frozen struct. * * Two deliberate divergences from jq's own parser, both from mirage * parsing a whole line before acting on it rather than one option at a * time. jq lets `-c`, `--tab` and `--indent` override each other in the * order typed; here `-c` wins whenever it appears. And jq reads a * non-numeric `--indent` as 0 (C atoi), where mirage refuses it like * every other int-typed option. */ export declare function parseFlags(fl: FlagView): JqOptions; /** * Turn the raw inputs into the value stream the program sees. * * jq reads every file and stdin as one stream, so slurping spans them all * rather than restarting per file. Line splitting stays per input: a file * with no trailing newline ends its last line there instead of joining it * to the next file's first. */ export declare function assembleInputs(chunks: readonly Uint8Array[], opts: JqOptions): Promise; /** Exit status for a run, which only -e makes interesting. */ export declare function exitCode(outputs: readonly unknown[], opts: JqOptions): number; export declare function jqGeneric(paths: PathSpec[], texts: string[], opts: CommandOpts, stream: Stream): Promise; export {}; //# sourceMappingURL=jq.d.ts.map