How a Channel behaves when its consumer cannot keep up.
const options: ChannelOptions<number> = { capacity: 1_000, overflow: 'dropNewest' }; options.capacity; // 1000 — past this, `overflow` decides which element is lost
How many elements to buffer for a consumer that has not taken them yet. Default 10_000.
optional
overflow: Overflow
What to do once capacity is reached: drop from either end, or 'fail' — end the stream
with a ChannelOverflowFailure element instead of losing anything quietly.
Default 'dropOldest'.
Called with each element the buffer actually lost, and the depth after the loss. The only
place overflow is observable — make it fatal from here by calling fail or abort.