Skip to content

Type Alias: MiddlewareAPI

MiddlewareAPI = object

Defined in: types.ts:131

Defines the methods and properties available to middleware for interacting with the store. Provides access to state, dispatching actions, dependencies, processing strategy, synchronization, and execution stack.

Properties

getState()

getState: (slice?) => any

Defined in: types.ts:132

Retrieves the state or a specific slice of the state.

Parameters

slice?

string[]

Returns

any


dispatch()

dispatch: (action) => Promise<void>

Defined in: types.ts:133

Dispatches an action (synchronous or asynchronous).

Parameters

action

Action | AsyncAction

Returns

Promise<void>


dependencies()

dependencies: () => any

Defined in: types.ts:134

Retrieves the current dependencies in the pipeline.

Returns

any


strategy()

strategy: () => ProcessingStrategy

Defined in: types.ts:135

Retrieves the current processing strategy.

Returns

ProcessingStrategy


lock

lock: SimpleLock

Defined in: types.ts:136

A lock to synchronize or prevent concurrent access to resources.

Released under the MIT License.