diff --git a/types/router.d.ts b/types/router.d.ts index c6c8eef65..844b91150 100644 --- a/types/router.d.ts +++ b/types/router.d.ts @@ -6,10 +6,10 @@ type Dictionary = { [key: string]: T }; export type RouterMode = "hash" | "history" | "abstract"; export type RawLocation = string | Location; export type RedirectOption = RawLocation | ((to: Route) => RawLocation); -export type NavigationGuard = ( +export type NavigationGuard = ( to: Route, from: Route, - next: (to?: RawLocation | false | ((vm: Vue) => any) | void) => void + next: (to?: RawLocation | false | ((vm: V) => any) | void) => void ) => any export declare class VueRouter { diff --git a/types/vue.d.ts b/types/vue.d.ts index 0210c9f0e..4e57eec79 100644 --- a/types/vue.d.ts +++ b/types/vue.d.ts @@ -15,8 +15,8 @@ declare module "vue/types/vue" { declare module "vue/types/options" { interface ComponentOptions { router?: VueRouter; - beforeRouteEnter?: NavigationGuard; - beforeRouteLeave?: NavigationGuard; - beforeRouteUpdate?: NavigationGuard; + beforeRouteEnter?: NavigationGuard; + beforeRouteLeave?: NavigationGuard; + beforeRouteUpdate?: NavigationGuard; } }