import type { Readable } from "node:stream"; /** Serialize one LF-delimited JSON record. */ export declare function serializeJsonLine(value: object | boolean | null | number | string): string; export interface JsonlReaderOptions { maxBytesPerTurn?: number; maxLinesPerTurn?: number; /** * Called once the stream has ended AND every buffered frame has been parsed. * A reader that yields between turns can still hold unparsed frames long * after the process exited, so callers that must not act before the last * frame is delivered wait for this instead of the exit event. */ onDrained?: () => void; } /** * Attach a strict LF-only JSONL reader. * * The stream is paused before queued chunks are drained, so one turn cannot parse * an unbounded number of frames. */ export declare function attachJsonlLineReader(stream: Readable, onLine: (line: string) => void, options?: JsonlReaderOptions): () => void; //# sourceMappingURL=jsonl.d.ts.map