Function: stream()
ts
function stream<A, D>(opts?: StreamOptions): StreamDescriptor<A, D>;Defined in: src/batteries/isolation/types.ts:126
Declare a fire-and-forward streaming method on an isolated service's spec — the host gets a (...args) => ReadableStream<D> facade method (synchronous: the stream is returned immediately, fed by deltas as they cross the wire); the guest implementation returns (or is called to produce) a ReadableStream<D> or AsyncIterable<D>.
Type Parameters
| Type Parameter | Description |
|---|---|
A extends unknown[] | The stream's argument tuple. |
D | The type of each streamed delta/chunk. |
Parameters
| Parameter | Type | Description |
|---|---|---|
opts | StreamOptions | See StreamOptions. |
Returns
StreamDescriptor<A, D>