import { type ParserError, type ParserState, s } from '@hashbrownai/core'; /** * The result object returned by the `useImperativeJsonParser` hook. * * @public * @typeParam Output - The type resolved by the schema. */ export interface UseImperativeJsonParserResult { /** * The current streaming JSON parser state. */ parserState: ParserState; /** * The latest resolved value produced by the schema or parser state. */ value: Output | undefined; /** * The current parser or schema error, if any. */ error: ParserError | Error | undefined; /** * Apply a JSON chunk to the parser. * @param chunk - The next JSON fragment. */ parseChunk: (chunk: string) => void; /** * Reset the parser to its initial state. */ reset: () => void; } /** * Create a streaming JSON parser that can optionally resolve values with a Skillet schema. * * @public * @typeParam Schema - The Hashbrown schema used to resolve streaming values. * @param schema - Optional Skillet schema to resolve values from the parser state. */ export declare function useImperativeJsonParser(schema: Schema): UseImperativeJsonParserResult>; //# sourceMappingURL=use-imperative-json-parser.d.ts.map