Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ExtraduceSettings<S, A, EA>

Settings to define features of processing.

Type parameters

  • S = unknown

  • A = unknown

  • EA = A

Hierarchy

  • ExtraduceSettings

Index

Properties

Optional data

data: unknown

Any supplementary data that should be available in processing.

Optional filterAction

filterAction: FilterAction<S, A, EA>

Function that should be called to test whether current action is valid and should be passed for reducing. If the function returns false, the current action will be ignored (will not be passed into source reducer). This function is called after a function that is specified in prepareAction setting.

Optional historySize

historySize: undefined | number

Size of list of fulfilled operations (processed actions). 0 (default value) means that data about operations should not be saved in the list. Negative value (for example -1) means that list size is not restricted.

Optional onStepEnd

onStepEnd: StepHandler<S, A, EA>

Function that should be called at the end of each processing step.

Optional onStepStart

onStepStart: StepHandler<S, A, EA>

Function that should be called at the start of each processing step.

Optional postreduce

postreduce: DataHandler<S, A, EA>

Function that should be called after source (wrapped) reducer. State returned by source reducer and current action will be passed into the function.

Optional postreduceValueIsState

postreduceValueIsState: undefined | false | true

Whether result of postreduce function should be used as new state in further processing. Default value is false.

Optional prepareAction

prepareAction: ActionTransformer<S, A, EA>

Function that should be called to prepare current action for further processing before filtering. Value returned by the function will be used as new current action.

Optional prereduce

prereduce: DataHandler<S, A, EA>

Function that should be called before source (wrapped) reducer.

Optional prereduceValueIsState

prereduceValueIsState: undefined | false | true

Whether result of prereduce function should be used as new state in further processing. Default value is false.

Optional processActionArray

processActionArray: undefined | false | true

Whether an array that is passed as action should be treated as list of actions that should be processed separately. Default value is true.

Optional reducerExtraArgs

reducerExtraArgs: unknown | GetReducerExtraArgs<S, A, EA>

Supplementary arguments that should be passed into source (wrapped) reducer besides state and action. Or a function that returns such arguments.

Optional skipFalsyAction

skipFalsyAction: undefined | false | true

Whether processing of an action that has a falsy value should be skipped. Default value is true. The corresponding check is made before calling a function that is specified in filterAction setting.

Optional transformAction

transformAction: ActionTransformer<S, A, EA>

Function that should be called to transform current valid action after filtering. Value returned by the function will be used as new current action for further processing.

Generated using TypeDoc