File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -12,5 +12,6 @@ export {
1212 RouteRecord ,
1313 Location ,
1414 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
44type Dictionary < T > = { [ key : string ] : T }
55type ErrorHandler = ( err : Error ) => void
66
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+
1012export type NavigationGuard < V extends Vue = Vue > = (
1113 to : Route ,
1214 from : Route ,
13- next : ( to ?: RawLocation | false | ( ( vm : V ) => any ) | void ) => void
15+ next : NavigationGuardNext < V >
1416) => any
1517
1618export declare class VueRouter {
You can’t perform that action at this time.
0 commit comments