//#region src/json/json-parse-async.d.ts /** * Asynchronous, non-blocking `JSON.parse`: parses `text` while periodically * yielding to the event loop, so large inputs don't starve it. Promisified and * typed. * @param text - The JSON string to parse. * @param reviver - Optional `JSON.parse` reviver function. * @param intensity - Work done per iteration before yielding, `1`–`32` (default `1`); higher trades responsiveness for throughput. * @returns A promise resolving to the parsed value as `unknown` — assert or validate the shape at the call site. * @example * // Parse a large payload without blocking the event loop * await jsonParseAsync('{"a": 1, "b": [2, 3]}'); * // {a: 1, b: [2, 3]} * @example * // A higher intensity does more work per tick (less yielding) * await jsonParseAsync(hugeJsonString, undefined, 8); */ declare const jsonParseAsync: (text: string, reviver?: (key: string, value: unknown) => unknown, intensity?: number) => Promise; //#endregion export { jsonParseAsync };