@@ -28,7 +28,7 @@ declare class VueRouter {
28
28
back ( ) : void ;
29
29
forward ( ) : void ;
30
30
getMatchedComponents ( to ?: RawLocation ) : Component [ ] ;
31
- onReady ( cb : Function ) ;
31
+ onReady ( cb : Function ) : void ;
32
32
addRoutes ( routes : RouteConfig [ ] ) : void ;
33
33
resolve ( to : RawLocation , current ?: Route , append ?: boolean ) : {
34
34
location : Location ;
@@ -54,6 +54,8 @@ export interface RouterOptions {
54
54
) => { x : number , y : number } | { selector : string } | void ;
55
55
}
56
56
57
+ type RoutePropsFunction = ( route : Route ) => Object ;
58
+
57
59
export interface RouteConfig {
58
60
path : string ;
59
61
name ?: string ;
@@ -64,7 +66,7 @@ export interface RouteConfig {
64
66
children ?: RouteConfig [ ] ;
65
67
meta ?: any ;
66
68
beforeEnter ?: NavigationGuard ;
67
- props ?: boolean | Object | Function ;
69
+ props ?: boolean | Object | RoutePropsFunction ;
68
70
}
69
71
70
72
export interface RouteRecord {
@@ -81,7 +83,7 @@ export interface RouteRecord {
81
83
redirect : ( location : RawLocation ) => void ,
82
84
next : ( ) => void
83
85
) => any ;
84
- props : boolean | Object | Function | Dictionary < boolean | Object | Function > ;
86
+ props : boolean | Object | RoutePropsFunction | Dictionary < boolean | Object | RoutePropsFunction > ;
85
87
}
86
88
87
89
export interface Location {
0 commit comments