/* eslint-disable */ /* prettier-ignore */ // Generated by elegant-router // Read more: https://github.com/soybeanjs/elegant-router declare module "@elegant-router/types" { type ElegantConstRoute = import('@elegant-router/vue').ElegantConstRoute; /** * route layout */ export type RouteLayout = "base" | "blank"; /** * route map */ export type RouteMap = { "root": "/"; "not-found": "/:pathMatch(.*)*"; "exception": "/exception"; "exception_403": "/exception/403"; "exception_404": "/exception/404"; "exception_500": "/exception/500"; "403": "/403"; "404": "/404"; "500": "/500"; "about": "/about"; "function": "/function"; "function_hide-child": "/function/hide-child"; "function_hide-child_one": "/function/hide-child/one"; "function_hide-child_three": "/function/hide-child/three"; "function_hide-child_two": "/function/hide-child/two"; "function_multi-tab": "/function/multi-tab"; "function_request": "/function/request"; "function_super-page": "/function/super-page"; "function_tab": "/function/tab"; "function_toggle-auth": "/function/toggle-auth"; "group-config": "/group-config"; "home": "/home"; "login": "/login/:module(pwd-login)?"; "manage": "/manage"; "manage_menu": "/manage/menu"; "manage_role": "/manage/role"; "manage_user": "/manage/user"; "manage_user-detail": "/manage/user-detail/:id"; "multi-menu": "/multi-menu"; "multi-menu_first": "/multi-menu/first"; "multi-menu_first_child": "/multi-menu/first/child"; "multi-menu_second": "/multi-menu/second"; "multi-menu_second_child": "/multi-menu/second/child"; "multi-menu_second_child_home": "/multi-menu/second/child/home"; "namepase": "/namepase"; "notify": "/notify"; "notify_recipient": "/notify/recipient"; "notify_scene": "/notify/scene"; "pods": "/pods"; "user-center": "/user-center"; }; /** * route key */ export type RouteKey = keyof RouteMap; /** * route path */ export type RoutePath = RouteMap[RouteKey]; /** * custom route key */ export type CustomRouteKey = Extract< RouteKey, | "root" | "not-found" | "exception" | "exception_403" | "exception_404" | "exception_500" >; /** * the generated route key */ export type GeneratedRouteKey = Exclude; /** * the first level route key, which contain the layout of the route */ export type FirstLevelRouteKey = Extract< RouteKey, | "403" | "404" | "500" | "about" | "function" | "group-config" | "home" | "login" | "manage" | "multi-menu" | "namepase" | "notify" | "pods" | "user-center" >; /** * the custom first level route key */ export type CustomFirstLevelRouteKey = Extract< CustomRouteKey, | "root" | "not-found" | "exception" >; /** * the last level route key, which has the page file */ export type LastLevelRouteKey = Extract< RouteKey, | "403" | "404" | "500" | "login" | "about" | "function_hide-child_one" | "function_hide-child_three" | "function_hide-child_two" | "function_multi-tab" | "function_request" | "function_super-page" | "function_tab" | "function_toggle-auth" | "group-config" | "home" | "manage_menu" | "manage_role" | "manage_user-detail" | "manage_user" | "multi-menu_first_child" | "multi-menu_second_child_home" | "namepase" | "notify_recipient" | "notify_scene" | "pods" | "user-center" >; /** * the custom last level route key */ export type CustomLastLevelRouteKey = Extract< CustomRouteKey, | "root" | "not-found" | "exception_403" | "exception_404" | "exception_500" >; /** * the single level route key */ export type SingleLevelRouteKey = FirstLevelRouteKey & LastLevelRouteKey; /** * the custom single level route key */ export type CustomSingleLevelRouteKey = CustomFirstLevelRouteKey & CustomLastLevelRouteKey; /** * the first level route key, but not the single level */ export type FirstLevelRouteNotSingleKey = Exclude; /** * the custom first level route key, but not the single level */ export type CustomFirstLevelRouteNotSingleKey = Exclude; /** * the center level route key */ export type CenterLevelRouteKey = Exclude; /** * the custom center level route key */ export type CustomCenterLevelRouteKey = Exclude; /** * the center level route key */ type GetChildRouteKey = T extends `${K}_${infer R}` ? R extends `${string}_${string}` ? never : T : never; /** * the single level route */ type SingleLevelRoute = K extends string ? Omit & { name: K; path: RouteMap[K]; component: `layout.${RouteLayout}$view.${K}`; } : never; /** * the last level route */ type LastLevelRoute = K extends LastLevelRouteKey ? Omit & { name: K; path: RouteMap[K]; component: `view.${K}`; } : never; /** * the center level route */ type CenterLevelRoute = K extends CenterLevelRouteKey ? Omit & { name: K; path: RouteMap[K]; children: (CenterLevelRoute> | LastLevelRoute>)[]; } : never; /** * the multi level route */ type MultiLevelRoute = K extends string ? ElegantConstRoute & { name: K; path: RouteMap[K]; component: `layout.${RouteLayout}`; children: (CenterLevelRoute> | LastLevelRoute>)[]; } : never; /** * the custom first level route */ type CustomSingleLevelRoute = K extends string ? Omit & { name: K; path: RouteMap[K]; component?: `layout.${RouteLayout}$view.${LastLevelRouteKey}`; } : never; /** * the custom last level route */ type CustomLastLevelRoute = K extends CustomLastLevelRouteKey ? Omit & { name: K; path: RouteMap[K]; component?: `view.${LastLevelRouteKey}`; } : never; /** * the custom center level route */ type CustomCenterLevelRoute = K extends CustomCenterLevelRouteKey ? Omit & { name: K; path: RouteMap[K]; children: (CustomCenterLevelRoute> | CustomLastLevelRoute>)[]; } : never; /** * the custom multi level route */ type CustomMultiLevelRoute = K extends string ? ElegantConstRoute & { name: K; path: RouteMap[K]; component: `layout.${RouteLayout}`; children: (CustomCenterLevelRoute> | CustomLastLevelRoute>)[]; } : never; /** * the custom route */ type CustomRoute = CustomSingleLevelRoute | CustomMultiLevelRoute; /** * the generated route */ type GeneratedRoute = SingleLevelRoute | MultiLevelRoute; /** * the elegant route */ type ElegantRoute = GeneratedRoute | CustomRoute; }