1
- import { Location , Action , History } from 'history' ;
2
- import { AnyAction as ReduxAction } from 'redux' ;
1
+ import type { Location , Action , History } from 'history' ;
2
+ import type { AnyAction as ReduxAction } from 'redux' ;
3
3
4
4
export const CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD' ;
5
5
export const LOCATION_CHANGE = '@@router/LOCATION_CHANGE' ;
@@ -16,7 +16,7 @@ export type HistoryMethods =
16
16
17
17
export const locationChangeAction = ( location : Location , action : Action ) => ( {
18
18
type : LOCATION_CHANGE ,
19
- payload : { location, action } ,
19
+ payload : { location, action } as { location : Location ; action : Action } ,
20
20
} ) ;
21
21
22
22
function updateLocation < T extends HistoryMethods > ( method : T ) {
@@ -36,12 +36,12 @@ export const goForward: () => ReduxAction = updateLocation('goForward');
36
36
export const back : ( ) => ReduxAction = updateLocation ( 'back' ) ;
37
37
export const forward : ( ) => ReduxAction = updateLocation ( 'forward' ) ;
38
38
39
- export type RouterActions =
40
- ReturnType < typeof push > |
41
- ReturnType < typeof replace > |
42
- ReturnType < typeof go > |
43
- ReturnType < typeof goBack > |
44
- ReturnType < typeof goForward > |
45
- ReturnType < typeof locationChangeAction > |
46
- ReturnType < typeof back > |
47
- ReturnType < typeof forward > ;
39
+ export type RouterActions =
40
+ | ReturnType < typeof push >
41
+ | ReturnType < typeof replace >
42
+ | ReturnType < typeof go >
43
+ | ReturnType < typeof goBack >
44
+ | ReturnType < typeof goForward >
45
+ | ReturnType < typeof locationChangeAction >
46
+ | ReturnType < typeof back >
47
+ | ReturnType < typeof forward > ;
0 commit comments