import { routerKey, routeLocationKey } from './injectionSymbols'
import { RouteRecord } from './matcher/types'
import { assign } from './utils'
+import { NavigationFailure } from './errors'
export interface RouterLinkOptions {
/**
isSameRouteLocationParams(currentRoute.params, route.value.params)
)
- function navigate(e: MouseEvent = {} as MouseEvent) {
+ function navigate(
+ e: MouseEvent = {} as MouseEvent
+ ): Promise<void | NavigationFailure> {
if (guardEvent(e))
return router[unref(props.replace) ? 'replace' : 'push'](unref(props.to))
return Promise.resolve()