import type { JsonValue } from "../json.js"; /** The text of a JSON value as UTF-8, in chunks of at most 64 KB. */ interface JsonText { readonly byteLength: number; readonly chunks: readonly Uint8Array[]; } /** * Writes the text of a value straight into chunks, byte for byte what `JSON.stringify` gives, and for the same * values: it gives nothing where `JSON.stringify` does, and throws where it throws. The text is never a string: one * character outside Latin-1 makes that string two bytes a character, and building it holds as much again, so a * 12 MB message cost 57 MiB before any of it was sent. */ declare function encodeJson(value: JsonValue): JsonText; declare function encodeJson(value: unknown): JsonText | undefined; export { encodeJson }; export type { JsonText }; //# sourceMappingURL=json-text.d.ts.map