@hashbrownai/core
Version:
Runtime helpers for Hashbrown AI
18 lines • 613 B
TypeScript
import { Frame } from './frame-types';
/**
* Decode options.
*/
export interface DecodeFramesOptions {
signal: AbortSignal;
}
/**
* Decode a ReadableStream<Uint8Array> of length-prefixed JSON frames into a stream of T.
*
* Frame format: [4-byte BE length][UTF-8 JSON payload]
*
* @param stream ReadableStream producing Uint8Array chunks
* @param options decoding options
* @yields parsed JSON objects of type T
*/
export declare function decodeFrames(stream: ReadableStream<Uint8Array>, options: DecodeFramesOptions): AsyncGenerator<Frame, void, unknown>;
//# sourceMappingURL=decode-frames.d.ts.map