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
Section titled “Import”import { buffer } from "@graphrefly/ts/operators";Signature
Section titled “Signature”function buffer(): Operator<unknown, S[]>Returns
Section titled “Returns”A Operator<unknown, S[]> value.
Example
Section titled “Example”import { buffer } from "@graphrefly/ts/operators";Source
Section titled “Source”packages/ts/src/graph/combinators.ts