import VueRouter, { RouteConfig, RawLocation, Route } from 'vue-router' const originalPush = VueRouter.prototype.push as unknown as Promise<Route> VueRouter.prototype.push = function push (location: RawLocation) { return (originalPush as any).call(this, location).catch((err: Error) => err) }