//#region src/json/json-stringify-async.d.ts /** * Asynchronous, non-blocking `JSON.stringify`: serializes `value` while * periodically yielding to the event loop, so large payloads don't starve it. * Promisified and typed. * @param value - The value to serialize. * @param replacer - Optional `JSON.stringify` replacer function or allow-list array. * @param space - Optional indentation (number of spaces or a string), as in `JSON.stringify`. * @param intensity - Work done per iteration before yielding, `1`–`32` (default `1`); higher trades responsiveness for throughput. * @returns A promise resolving to the JSON string. * @example * // Serialize a large payload without blocking the event loop * await jsonStringifyAsync({a: 1, b: [2, 3]}); * // '{"a":1,"b":[2,3]}' * @example * // Pretty-print with 2-space indentation * await jsonStringifyAsync({a: 1}, null, 2); * // '{\n "a": 1\n}' */ declare const jsonStringifyAsync: (value: object, replacer?: ((key: string, value: unknown) => unknown) | (number | string)[] | null, space?: number | string, intensity?: number) => Promise; //#endregion export { jsonStringifyAsync };