Options
Menu

Interface AsyncSystemConfig<Query, Data, Error>

Configuration options for AsyncSystem.

Hierarchy

Properties

Optional DATA_UNIT

DATA_UNIT: UnitConfig<any>

Configuration options for the dataUnit.

default

undefined

Optional ERROR_UNIT

ERROR_UNIT: UnitConfig<any>

Configuration options for the errorUnit.

default

undefined

Optional PENDING_UNIT

PENDING_UNIT: UnitConfig<any>

Configuration options for the pendingUnit.

default

undefined

Optional QUERY_UNIT

QUERY_UNIT: UnitConfig<any>

Configuration options for the queryUnit.

default

undefined

Optional UNITS

UNITS: SharedUnitConfig<any>

Common configuration options for the AsyncSystem's member Units.

default

undefined

Optional autoUpdatePendingValue

autoUpdatePendingValue: boolean

An option if not set to false will make the AsyncSystem dispatch true or false to the pendingUnit,
true whenever the queryUnit emits a value, and
false whenever the dataUnitUnit or errorUnit emit a value.

default

true

Optional clearDataOnError

clearDataOnError: boolean

An option if set to true will make the AsyncSystem trigger dataUnit.clearValue(), whenever the errorUnit emits a value.

Note: It only works if clearDataOnQuery is not set to true. As only one of them can work at a time.

default

false

Optional clearDataOnQuery

clearDataOnQuery: boolean

An option if set to true will make the AsyncSystem trigger dataUnit.clearValue(), whenever the queryUnit emits a value.

Note: If set to true, it'll turn off clearDataOnError. As only one of them can work at a time.

default

false

Optional clearErrorOnData

clearErrorOnData: boolean

An option if not set to false will make the AsyncSystem trigger errorUnit.clearValue(), whenever the dataUnit emits a value.

Note: It only works if clearErrorOnQuery is not set to true. As only one of them can work at a time.

default

true

Optional clearErrorOnQuery

clearErrorOnQuery: boolean

An option if set to true will make the AsyncSystem trigger errorUnit.clearValue(), whenever the queryUnit emits a value.

Note: If set to true, it'll turn off clearErrorOnData. As only one of them can work at a time.

default

false

Optional clearQueryOnData

clearQueryOnData: boolean

An option if set to true will make the AsyncSystem trigger queryUnit.clearValue(), whenever the dataUnit emits a value.

default

false

Optional clearQueryOnError

clearQueryOnError: boolean

An option if set to true will make the AsyncSystem trigger queryUnit.clearValue(), whenever the errorUnit emits a value.

default

false

Optional freezeQueryWhilePending

freezeQueryWhilePending: boolean

An option if set to true will make the AsyncSystem freeze the queryUnit, whenever the pendingUnit emits true, and
unfreeze the queryUnit, whenever the pendingUnit emits false.

default

false

Optional id

id: string

A unique id for the AsyncSystem and its Units. \

This id is used to derive ids for the Units part of the AsyncSystem.
For example the queryUnit gets assigned an id like id + '_QUERY',
similarly dataUnit gets assigned an id like id + '_DATA', and so on.

If an id is already provided for the Unit, the derived id wouldn't override it.

default

undefined

Optional initialValue

initialValue: AsyncSystemValue<Query, Data, Error>

The combined initial value that can be used to pass initial values to the AsyncSystem's member Units.
It gets overridden by AsyncSystemConfig.UNITS or other Units specific configuration like AsyncSystemConfig.QUERY_UNIT.

default

undefined

Optional replay

replay: boolean

A flag to control the replay behaviour of the AsyncSystem.
It decides whether the value should be replayed when you subscribe to the default Observable.

default

true