export type JsonPath = ReadonlyArray; export interface PartialJson { /** Everything parsed so far; containers still being written are closed. */ value: unknown; /** True when the text was a complete JSON document. */ complete: boolean; /** * Path of the string still being written, if the text stops inside one. * Every other string in `value` is complete. */ openStringPath: JsonPath | null; /** True when the text can't become valid JSON however it continues. */ invalid: boolean; } /** * Parses JSON that is still streaming in. A string cut off mid-way keeps what * has arrived, a number or literal cut off mid-way is dropped, and unclosed * objects and arrays are closed. A key whose value hasn't started is omitted. */ export declare function parsePartialJson(text: string): PartialJson; export declare function readJsonPath(value: unknown, path: JsonPath): unknown; /** True when the string at `path` has arrived in full. */ export declare function isJsonStringComplete(partial: PartialJson, path: JsonPath): boolean;