import { type AsyncReducer } from "https://deno.land/x/rimbu@1.2.0/core/mod.ts";
const { Instance } = AsyncReducer;
An async reducer instance that manages its own state based on the reducer definition that was used to create this instance.
Methods
Returns true if the reducer instance does not receive any more values, false otherwise.
Method that, when called, halts the reducer instance so that it will no longer receive values.
next(value: I): MaybePromise<void>
Sends a new value into the reducer instance.
getOutput(): MaybePromise<O>
Returns the output value based on the current given input values.
Methods
Returns true if the reducer instance does not receive any more values, false otherwise.
Method that, when called, halts the reducer instance so that it will no longer receive values.
next(value: I): MaybePromise<void>
Sends a new value into the reducer instance.
getOutput(): MaybePromise<O>
Returns the output value based on the current given input values.