@@ -54,7 +54,7 @@ export interface Events {
5454 }
5555}
5656
57- export type ActionsCallback < Effects , State > = (
57+ export type ActionsCallback < State , Effects > = (
5858 action : TAction < State , Effects & { state : State } >
5959) => any
6060
@@ -82,15 +82,15 @@ export default class App<
8282 [ namespace : string ] : ReactionsCallback < State , any >
8383 } ,
8484 Actions extends
85- | ActionsCallback < Effects , State >
85+ | ActionsCallback < State , Effects >
8686 | {
8787 [ namespace : string ] : ActionsCallback < { } , { } >
8888 }
8989> {
9090 private proxyStateTree : ProxyStateTree
9191 private eventHub : EventEmitter < Events >
9292 devtools : Devtools
93- actions : Actions extends ActionsCallback < Effects , State >
93+ actions : Actions extends ActionsCallback < State , Effects >
9494 ? ReturnType < Actions >
9595 : Actions extends {
9696 [ namespace : string ] : ActionsCallback < { } , { } >
@@ -325,7 +325,7 @@ export default class App<
325325 private getActions ( configuration , action ) {
326326 const actions =
327327 typeof configuration . actions === 'function'
328- ? ( configuration . actions as ActionsCallback < Effects , State > ) (
328+ ? ( configuration . actions as ActionsCallback < State , Effects > ) (
329329 action as TAction < State , Effects & { state : State } >
330330 )
331331 : ( Object . keys ( configuration . actions || { } ) . reduce (
0 commit comments