TypeScript API / laikacms/core / LaikaStream / make
Function: make()
ts
function make<A, D, R>(build, options?): LaikaStream<A, D, R>;Generator-style builder for arbitrary LaikaStreams. 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 LaikaDone | - |
R | never |
Parameters
| Parameter | Type |
|---|---|
build | (emit) => Effect<D, LaikaError<ErrorCode, number>, R> |
options? | { capacity?: number; } |
options.capacity? | number |
Returns
LaikaStream<A, D, R>