Skip to main content

class InstanceImpl<I,O,S>

The default AsyncReducer.Impl implementation.

Implements: AsyncReducer.Instance<I,O>

Type parameters

NameDescription
Ithe input element type
Othe output element type
Sthe reducer state type

Properties

halt

undocumented

Definition

halt: () => void;

halted

undocumented

Definition

get halted(): boolean;

Overrides

Instance.halted

index

undocumented

Definition

get index(): number;

Overrides

Instance.index

next

undocumented

Definition

next: (value: I) => Promise<void>;

reducer

undocumented

Definition

readonly reducer: AsyncReducer.Impl<I, O, S>;

Methods

getOutput

undocumented

Definition

getOutput(): Promise<O>;

Overrides

Instance.getOutput

halt

Method that, when called, halts the reducer instance so that it will no longer receive values.

Definition

halt(): void;

Overrides

Instance.halt

initialize

undocumented

Definition

initialize(): Promise<void>;

next

Sends a new value into the reducer instance.

Definition

next(value: I): MaybePromise<void>;

Parameters

NameTypeDescription
valueIthe next input value

Overrides

Instance.next

onClose

undocumented

Definition

onClose(err?: unknown): Promise<void>;

Parameters

NameTypeDescription
errunknown

Overrides

Instance.onClose