File tree 2 files changed +12
-3
lines changed
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 {
23
23
beforeEach ( guard : NavigationGuard ) : Function ;
24
24
beforeResolve ( guard : NavigationGuard ) : Function ;
25
25
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 ;
28
26
push ( location : RawLocation ) : Promise < Route > ;
29
27
replace ( location : RawLocation ) : Promise < Route > ;
28
+ push ( location : RawLocation , onComplete ?: Function , onAbort ?: ErrorHandler ) : void ;
29
+ replace ( location : RawLocation , onComplete ?: Function , onAbort ?: ErrorHandler ) : void ;
30
30
go ( n : number ) : void ;
31
31
back ( ) : void ;
32
32
forward ( ) : void ;
Original file line number Diff line number Diff line change @@ -159,7 +159,16 @@ router.push({
159
159
router . replace ( { name : "home" } ) ;
160
160
161
161
router . 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 ( ( ) => { } )
163
172
164
173
router . onReady ( ( ) => { } ) ;
165
174
You can’t perform that action at this time.
0 commit comments