import { Router, RouteLocationNormalized, NavigationGuardNext, NavigationGuardReturn, NavigationGuard } from 'vue-router'; import { Ref } from 'vue'; export const access: { hasAccess(accessId: string | number): Promise; isDataReady(): boolean; setRole(roleId: string | Promise): void; setAccess(accessIds: Array | Promise>): void; getAccess(): string[]; }; export function useAccess(accessId: Array): Ref; interface CustomNavigationGuardOption { router: Router; to: RouteLocationNormalized; from: RouteLocationNormalized; next: NavigationGuardNext; } interface CustomNavigationGuard { (option: CustomNavigationGuardOption): NavigationGuardReturn | Promise; } declare module '@fesjs/fes' { interface PluginBuildConfig { access?: | { rules: Record; } | false; } interface PluginRuntimeConfig { access?: { noFoundHandler: NavigationGuard; unAccessHandler: CustomNavigationGuard; }; } }