interface AsyncReducer.Instance<I,O>
An async reducer instance that manages its own state based on the reducer definition that was used to create this instance.
Implemented by: InstanceImpl<I,O,S>
Type parameters
Name | Description |
---|---|
I | the input element type |
O | the output element type |
Properties
halted
Returns true if the reducer instance does not receive any more values, false otherwise.
halted
Definition
get halted(): boolean;
Methods
getOutput
Returns the output value based on the current given input values.
getOutput
Definition
getOutput():
MaybePromise
<O>;
halt
Method that, when called, halts the reducer instance so that it will no longer receive values.
halt
Definition
halt(): void;
next
Sends a new value into the reducer instance.
next
Definition
next(value: I):
MaybePromise
<void>;
Parameters
Name | Type | Description |
---|---|---|
value | I | the next input value |