Interface StreamingResponse<O, S>

Streaming response from an action.

interface StreamingResponse<
    O extends ZodTypeAny = ZodTypeAny,
    S extends ZodTypeAny = ZodTypeAny,
> {
    output: Promise<TypeOf<O>>;
    stream: AsyncGenerator<TypeOf<S>, any, unknown>;
}

Type Parameters

Properties

Properties

output: Promise<TypeOf<O>>

Final output of the action.

stream: AsyncGenerator<TypeOf<S>, any, unknown>

Iterator over the streaming chunks.