|
|
|
|
@ -21,12 +21,12 @@ export interface Router {
|
|
|
|
|
*/
|
|
|
|
|
go: (to?: string) => Promise<void>
|
|
|
|
|
/**
|
|
|
|
|
* Called before the route changes. Return false to cancel the navigation.
|
|
|
|
|
* Called before the route changes. Return `false` to cancel the navigation.
|
|
|
|
|
*/
|
|
|
|
|
onBeforeRouteChange?: (to: string) => Awaitable<void | boolean>
|
|
|
|
|
/**
|
|
|
|
|
* Called before the page component is loaded (after the history state is
|
|
|
|
|
* updated). Return false to cancel the navigation.
|
|
|
|
|
* updated). Return `false` to cancel the navigation.
|
|
|
|
|
*/
|
|
|
|
|
onBeforePageLoad?: (to: string) => Awaitable<void | boolean>
|
|
|
|
|
/**
|
|
|
|
|
|