effect-io-ai

Package: effect
Module: Channel

Channel.buffer

Creates a channel backed by a buffer. When the buffer is empty, the channel will simply passthrough its input as output. However, when the buffer is non-empty, the value inside the buffer will be passed along as output.

Signature

declare const buffer: <InElem, InErr, InDone>(options: { readonly empty: InElem; readonly isEmpty: Predicate<InElem>; readonly ref: Ref.Ref<InElem>; }) => Channel<InElem, InElem, InErr, InErr, InDone, InDone, never>

Source

Since v2.0.0