File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export type ActionPayload<ACTION extends string> = {
6
6
[ KEY in ACTION ] ?: { [ key : string ] : any } ;
7
7
} ;
8
8
9
- export interface ActionMeta < ACTION extends string , PAYLOAD extends ActionPayload < ACTION > > {
9
+ export interface ActionMeta < ACTION extends string , PAYLOAD extends ActionPayload < ACTION > = { } > {
10
10
name : ACTION ;
11
11
payload : PAYLOAD [ ACTION ] ;
12
12
}
@@ -19,13 +19,13 @@ export type ActionHandler<STATE, PAYLOAD> =
19
19
| ( ( payload : PAYLOAD | never ) => ( state : STATE ) => STATE )
20
20
| ( ( payload : PAYLOAD | never ) => Partial < STATE > ) ;
21
21
22
- export type EffectHandler < STATE , ACTION extends string , PAYLOAD extends ActionPayload < ACTION > > = (
22
+ export type EffectHandler < STATE , ACTION extends string , PAYLOAD extends ActionPayload < ACTION > = { } > = (
23
23
action : ActionMeta < ACTION , PAYLOAD > ,
24
24
state : STATE ,
25
25
dispatch : ( action : ACTION , payload ?: PAYLOAD [ ACTION ] ) => void
26
26
) => void ;
27
27
28
- export type Effects < STATE , ACTION extends string , PAYLOAD extends ActionPayload < ACTION > > = {
28
+ export type Effects < STATE , ACTION extends string , PAYLOAD extends ActionPayload < ACTION > = { } > = {
29
29
[ KEY in ACTION ] ?: EffectHandler < STATE , ACTION , PAYLOAD > ;
30
30
} ;
31
31
You can’t perform that action at this time.
0 commit comments