declare module '@discoveryjs/json-ext' { type Chunk = string | Uint8Array | Buffer; type Reviver = (this: any, key: string, value: any) => any; type ParseChunkState = { readonly mode: 'json' | 'jsonl'; readonly rootValuesCount: number; readonly consumed: number; readonly parsed: number; }; type OnRootValue = (value: any, state: ParseChunkState) => void; type OnChunk = (chunkParsed: number, chunk: string | null, pending: string | null, state: ParseChunkState) => void; type ParseOptions = { reviver?: Reviver; mode?: 'json' | 'jsonl' | 'auto'; onRootValue?: OnRootValue; onChunk?: OnChunk; }; type Replacer = | ((this: any, key: string, value: any) => any) | (string | number)[] | null; type Space = string | number | null; type StringifyOptions = { replacer?: Replacer; space?: Space; mode?: 'json' | 'jsonl'; highWaterMark?: number; } type StringifyInfoOptions = { replacer?: Replacer; space?: Space; mode?: 'json' | 'jsonl'; continueOnCircular?: boolean; } type StringifyInfoResult = { bytes: number; spaceBytes: number; circular: object[]; }; export function parseChunked(input: Iterable | AsyncIterable, reviver?: Reviver): Promise; export function parseChunked(input: Iterable | AsyncIterable, options: ParseOptions & { onRootValue: OnRootValue }): Promise; export function parseChunked(input: Iterable | AsyncIterable, options?: ParseOptions): Promise; export function parseChunked(input: () => (Iterable | AsyncIterable), reviver?: Reviver): Promise; export function parseChunked(input: () => (Iterable | AsyncIterable), options: ParseOptions & { onRootValue: OnRootValue }): Promise; export function parseChunked(input: () => (Iterable | AsyncIterable), options?: ParseOptions): Promise; export function stringifyChunked(value: any, replacer?: Replacer, space?: Space): Generator; export function stringifyChunked(value: any, options: StringifyOptions): Generator; export function stringifyInfo(value: any, replacer?: Replacer, space?: Space): StringifyInfoResult; export function stringifyInfo(value: any, options?: StringifyInfoOptions): StringifyInfoResult; // Web streams export function parseFromWebStream(stream: ReadableStream): Promise; export function createStringifyWebStream(value: any, replacer?: Replacer, space?: Space): ReadableStream; export function createStringifyWebStream(value: any, options: StringifyOptions): ReadableStream; }