File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ export declare class VueRouter {
2323 beforeEach ( guard : NavigationGuard ) : Function ;
2424 beforeResolve ( guard : NavigationGuard ) : Function ;
2525 afterEach ( hook : ( to : Route , from : Route ) => any ) : Function ;
26- push ( location : RawLocation , onComplete ?: Function , onAbort ?: ErrorHandler ) : void ;
27- replace ( location : RawLocation , onComplete ?: Function , onAbort ?: ErrorHandler ) : void ;
2826 push ( location : RawLocation ) : Promise < Route > ;
2927 replace ( location : RawLocation ) : Promise < Route > ;
28+ push ( location : RawLocation , onComplete ?: Function , onAbort ?: ErrorHandler ) : void ;
29+ replace ( location : RawLocation , onComplete ?: Function , onAbort ?: ErrorHandler ) : void ;
3030 go ( n : number ) : void ;
3131 back ( ) : void ;
3232 forward ( ) : void ;
Original file line number Diff line number Diff line change @@ -159,7 +159,16 @@ router.push({
159159router . replace ( { name : "home" } ) ;
160160
161161router . push ( '/' , ( ) => { } , ( ) => { } )
162- router . replace ( '/foo' , ( ) => { } , ( ) => { } ) ;
162+ router . replace ( '/foo' , ( ) => { } , ( ) => { } )
163+
164+ // promises
165+
166+ router
167+ . push ( '/' )
168+ . then ( route => {
169+ route . fullPath
170+ } )
171+ . catch ( ( ) => { } )
163172
164173router . onReady ( ( ) => { } ) ;
165174
You can’t perform that action at this time.
0 commit comments