nativescript-vue-router-extended
Version:
NativeScript Vue Router Extended for NativeScript Vue hybrid Apps.
28 lines (18 loc) • 829 B
TypeScript
import type {
NavigationGuard,
NavigationGuardNext,
} from 'vue-router';
export type NextCallback = (vm: any) => any;
export type NextContext = NavigationGuardNext;
export type GuardReturnContext = string | Route | boolean | Error;
export type BeforeEachGuardCallback = (to: Route, from?: Route, next?: NextContext) => void;
export type BeforeResolveGuardCallback = (to: Route, from?: Route, next?: NextContext) => void;
export type AfterEachHookCallback = (to: Route, from?: Route) => void;
export type BeforeRouteEnter = (to: Route, from?: Route, next?: NextContext) => void;
export type BeforeRouteLeave = (to: Route, from?: Route, next?: NextContext) => void;
export type NavigationGuardCallback = NavigationGuard;
export interface GuardsInitArgs {
to: Route;
from?: Route;
next?: NextContext;
}