API Reference
buffer()
buffer: accumulate dep 0 (source) DATA; flush the buffer as an array each time dep 1 (notifier) delivers DATA. partial:true + ctx.state buffer. On source COMPLETE, flush any remainder then COMPLETE (completeWhenDepsComplete:false + terminalAsRealInput:true; a notifier terminal is ignored). Source/notifier ERROR propagates (default errorWhenDepsError).
Import
import { buffer } from "@graphrefly/ts/operators";
Signature
function buffer(): Operator<unknown, S[]>
Returns
A Operator<unknown, S[]> value.
Example
import { buffer } from "@graphrefly/ts/operators";
Source
packages/ts/src/graph/combinators.ts