@@ -22,11 +22,13 @@ const action: ReduxActions.Action = incrementAction(42);
22
22
amount => ( { remote : true } )
23
23
) ;
24
24
25
+ let state : number ;
26
+
25
27
const actionHandler = ReduxActions . handleAction (
26
28
'INCREMENT' ,
27
29
( state : number , action : ReduxActions . Action ) => state + 1
28
30
) ;
29
- actionHandler ( 0 , { type : 'INCREMENT' } ) ;
31
+ state = actionHandler ( 0 , { type : 'INCREMENT' } ) ;
30
32
31
33
32
34
const actionHandlerWithReduceMap = ReduxActions . handleAction (
@@ -37,18 +39,18 @@ const actionHandlerWithReduceMap = ReduxActions.handleAction(
37
39
throw ( state : number ) { return state }
38
40
}
39
41
) ;
40
- actionHandlerWithReduceMap ( 0 , { type : 'INCREMENT' } ) ;
42
+ state = actionHandlerWithReduceMap ( 0 , { type : 'INCREMENT' } ) ;
41
43
42
44
const actionsHandler = ReduxActions . handleActions < number > ( {
43
45
'INCREMENT' : ( state : number , action : ReduxActions . Action ) => state + 1 ,
44
46
'DECREMENT' : ( state : number , action : ReduxActions . Action ) => state - 1
45
47
} ) ;
46
- actionsHandler ( 0 , { type : 'INCREMENT' } ) ;
48
+ state = actionsHandler ( 0 , { type : 'INCREMENT' } ) ;
47
49
48
50
const actionsHandlerWithInitialState = ReduxActions . handleActions < number > ( {
49
51
'INCREMENT' : ( state : number , action : ReduxActions . Action ) => state + 1 ,
50
52
'DECREMENT' : ( state : number , action : ReduxActions . Action ) => state - 1
51
53
} , 0 ) ;
52
- actionsHandlerWithInitialState ( 0 , { type : 'INCREMENT' } ) ;
54
+ state = actionsHandlerWithInitialState ( 0 , { type : 'INCREMENT' } ) ;
53
55
54
56
0 commit comments