@@ -13,47 +13,47 @@ import type {
13
13
Query ,
14
14
} from 'history' ;
15
15
16
- export interface Params {
16
+ interface Params {
17
17
[ key : string ] : string ;
18
18
}
19
19
20
- export type RoutePattern = string ;
20
+ type RoutePattern = string ;
21
21
export type RouteComponent = React . ComponentClass < any > | React . FunctionComponent < any > ;
22
22
23
- export interface RouteComponents {
23
+ interface RouteComponents {
24
24
[ name : string ] : RouteComponent ;
25
25
}
26
26
27
- export interface RouterState < Q = any > {
27
+ interface RouterState < Q = any > {
28
28
components : RouteComponent [ ] ;
29
29
location : Location < Q > ;
30
30
params : Params ;
31
31
routes : PlainRoute [ ] ;
32
32
}
33
33
34
- export interface RedirectFunction {
34
+ interface RedirectFunction {
35
35
( location : LocationDescriptor ) : void ;
36
36
( state : LocationState , pathname : Pathname | Path , query ?: Query ) : void ;
37
37
}
38
38
39
39
type AnyFunction = ( ...args : any [ ] ) => any ;
40
40
41
- export type EnterHook = (
41
+ type EnterHook = (
42
42
nextState : RouterState ,
43
43
replace : RedirectFunction ,
44
44
callback ?: AnyFunction
45
45
) => any ;
46
46
47
- export type LeaveHook = ( prevState : RouterState ) => any ;
47
+ type LeaveHook = ( prevState : RouterState ) => any ;
48
48
49
- export type ChangeHook = (
49
+ type ChangeHook = (
50
50
prevState : RouterState ,
51
51
nextState : RouterState ,
52
52
replace : RedirectFunction ,
53
53
callback ?: AnyFunction
54
54
) => any ;
55
55
56
- export type RouteHook = ( nextLocation ?: Location ) => any ;
56
+ type RouteHook = ( nextLocation ?: Location ) => any ;
57
57
58
58
type ComponentCallback = ( err : any , component : RouteComponent ) => any ;
59
59
type ComponentsCallback = ( err : any , components : RouteComponents ) => any ;
0 commit comments