Interface StreamingResponse<O, S>

Streaming response from an action.

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

Type Parameters

Properties

Properties

output: Promise<z.TypeOf<O>>

Final output of the action.

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

Iterator over the streaming chunks.