import type { JsonOutputBudget } from "./json-output-budget.js"; import type { JsonBudget, JsonObject, JsonValue } from "./json-value.js"; export type JsonProducer = (path: string, depth: number) => JsonValue; export type JsonField = readonly [string, JsonProducer]; export type JsonOutputFactory = (nodes: JsonBudget, byteError?: string) => JsonOutput; /** Materializes lazy JSON fields only after their container and key fit the budget. */ export declare class JsonOutput { private readonly budget; constructor(budget: JsonOutputBudget); measure(value: JsonValue, path: string): number; copy(value: JsonValue, path: string, depth?: number): JsonValue; object(fields: Iterable, path: string, depth: number): JsonObject; array(items: Iterable, path: string, depth: number): JsonValue[]; formatted(parts: Iterable, render: () => string, path: string, depth: number): string; private fields; private items; } //# sourceMappingURL=json-output.d.ts.map