couch-kit
Preparing search index...
@couch-kit/core
Middleware
Type Alias Middleware<S, A>
Middleware
:
(
api
:
MiddlewareAPI
<
S
>
,
)
=>
(
next
:
MiddlewareDispatch
<
S
,
A
>
,
)
=>
(
action
:
A
|
InternalAction
<
S
>
)
=>
S
Redux-style middleware — a three-layer curried function:
Receives the middleware API (
getState
).
Receives
next
(the downstream dispatch).
Receives the
action
and returns the new state.
Type Parameters
S
extends
IGameState
=
IGameState
A
extends
IAction
=
IAction
Type Declaration
(
api
:
MiddlewareAPI
<
S
>
,
)
:
(
next
:
MiddlewareDispatch
<
S
,
A
>
)
=>
(
action
:
A
|
InternalAction
<
S
>
)
=>
S
Parameters
api
:
MiddlewareAPI
<
S
>
Returns
(
next
:
MiddlewareDispatch
<
S
,
A
>
)
=>
(
action
:
A
|
InternalAction
<
S
>
)
=>
S
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
couch-kit
Loading...
Redux-style middleware — a three-layer curried function:
getState).next(the downstream dispatch).actionand returns the new state.