@@ -28,7 +28,7 @@ declare class VueRouter {
2828 back ( ) : void ;
2929 forward ( ) : void ;
3030 getMatchedComponents ( to ?: RawLocation ) : Component [ ] ;
31- onReady ( cb : Function ) ;
31+ onReady ( cb : Function ) : void ;
3232 addRoutes ( routes : RouteConfig [ ] ) : void ;
3333 resolve ( to : RawLocation , current ?: Route , append ?: boolean ) : {
3434 location : Location ;
@@ -54,6 +54,8 @@ export interface RouterOptions {
5454 ) => { x : number , y : number } | { selector : string } | void ;
5555}
5656
57+ type RoutePropsFunction = ( route : Route ) => Object ;
58+
5759export interface RouteConfig {
5860 path : string ;
5961 name ?: string ;
@@ -64,7 +66,7 @@ export interface RouteConfig {
6466 children ?: RouteConfig [ ] ;
6567 meta ?: any ;
6668 beforeEnter ?: NavigationGuard ;
67- props ?: boolean | Object | Function ;
69+ props ?: boolean | Object | RoutePropsFunction ;
6870}
6971
7072export interface RouteRecord {
@@ -81,7 +83,7 @@ export interface RouteRecord {
8183 redirect : ( location : RawLocation ) => void ,
8284 next : ( ) => void
8385 ) => any ;
84- props : boolean | Object | Function | Dictionary < boolean | Object | Function > ;
86+ props : boolean | Object | RoutePropsFunction | Dictionary < boolean | Object | RoutePropsFunction > ;
8587}
8688
8789export interface Location {
0 commit comments