TypeScript API / contentia/core / ContentiaStream / make
Function: make()
ts
function make<A, D, R>(build, options?): ContentiaStream<A, D, R>;Generator-style builder for arbitrary ContentiaStreams. The builder receives an emit API and returns an Effect that resolves to the typed done value.
The builder's Effect runs concurrently with the consumer: emissions land in a bounded queue, the consumer pulls chunks as they're ready, and when the builder completes the queue terminates with the done value as its Done leftover.
Type Parameters
| Type Parameter | Default type |
|---|---|
A | - |
D extends ContentiaDone | - |
R | never |
Parameters
| Parameter | Type |
|---|---|
build | (emit) => Effect<D, ContentiaError<ErrorCode, number>, R> |
options? | { capacity?: number; } |
options.capacity? | number |
Returns
ContentiaStream<A, D, R>