Skip to content

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 ParameterDefault type
A-
D extends LaikaDone-
Rnever

Parameters ​

ParameterType
build(emit) => Effect<D, LaikaError<ErrorCode, number>, R>
options?{ capacity?: number; }
options.capacity?number

Returns ​

LaikaStream<A, D, R>

Released under the MIT License.