File tree 2 files changed +9
-6
lines changed
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -12,5 +12,6 @@ export {
12
12
RouteRecord ,
13
13
Location ,
14
14
Route ,
15
- NavigationGuard
16
- } from './router'
15
+ NavigationGuard ,
16
+ NavigationGuardNext
17
+ } from "./router" ;
Original file line number Diff line number Diff line change @@ -4,13 +4,15 @@ type Component = ComponentOptions<Vue> | typeof Vue | AsyncComponent
4
4
type Dictionary < T > = { [ key : string ] : T }
5
5
type ErrorHandler = ( err : Error ) => void
6
6
7
- export type RouterMode = 'hash' | 'history' | 'abstract'
8
- export type RawLocation = string | Location
9
- export type RedirectOption = RawLocation | ( ( to : Route ) => RawLocation )
7
+ export type RouterMode = "hash" | "history" | "abstract" ;
8
+ export type RawLocation = string | Location ;
9
+ export type RedirectOption = RawLocation | ( ( to : Route ) => RawLocation ) ;
10
+ export type NavigationGuardNext < V extends Vue = Vue > = ( to ?: RawLocation | false | ( ( vm : V ) => any ) | void ) => void ;
11
+
10
12
export type NavigationGuard < V extends Vue = Vue > = (
11
13
to : Route ,
12
14
from : Route ,
13
- next : ( to ?: RawLocation | false | ( ( vm : V ) => any ) | void ) => void
15
+ next : NavigationGuardNext < V >
14
16
) => any
15
17
16
18
export declare class VueRouter {
You can’t perform that action at this time.
0 commit comments