UNPKG

@npkg/vue-router

Version:

> This is `vue-router3.0` Extended version which works only with `Vue 2.0`. For the `Vue3.0` router see the [npm-pkg/vue-router@next](https://github.com/npm-pkg/vue-router). > The extension supports automatic jump to external link

23 lines (19 loc) 484 B
/** * Augment the typings of Vue.js */ import Vue from "vue"; import VueRouter, { Route, RawLocation, NavigationGuard } from "./index"; declare module "vue/types/vue" { interface Vue { $router: VueRouter; $route: Route; } } declare module "vue/types/options" { interface ComponentOptions<V extends Vue> { router?: VueRouter; beforeRouteEnter?: NavigationGuard<V>; beforeRouteLeave?: NavigationGuard<V>; beforeRouteUpdate?: NavigationGuard<V>; } }