Skip to main content

Function: processJsonStream()

function processJsonStream(stream: AsyncGenerator<unknown, any, unknown>, onProgress?: OnProgressCallback): Promise<Results>

Parse an async generator of serialized session states and return the results.

Parameters

ParameterTypeDescription

stream

AsyncGenerator<unknown, any, unknown>

An async generator of serialized session states

onProgress?

OnProgressCallback

A callback to be called with the current state of the session

Returns

Promise<Results>

A promise that resolves to the final results of the session