// Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️
// It's recommended to commit this file.
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
///
import type {
// type safe route locations
RouteLocationTypedList,
RouteLocationResolvedTypedList,
RouteLocationNormalizedTypedList,
RouteLocationNormalizedLoadedTypedList,
// helper types
// route definitions
RouteRecordInfo,
ParamValue,
ParamValueOneOrMore,
ParamValueZeroOrMore,
ParamValueZeroOrOne,
// vue-router extensions
_RouterTyped,
RouterLinkTyped,
NavigationGuard,
UseLinkFnTyped,
// data fetching
_DataLoader,
_DefineLoaderOptions,
} from 'unplugin-vue-router'
declare module 'vue-router/auto/routes' {
export interface RouteNamedMap {
'/': RouteRecordInfo<'/', '/', Record, Record>,
'/[...404]': RouteRecordInfo<'/[...404]', '/:404(.*)', { 404: ParamValue }, { 404: ParamValue }>,
'/about': RouteRecordInfo<'/about', '/about', Record, Record>,
'/category/': RouteRecordInfo<'/category/', '/category/', Record, Record>,
'/category/[id]': RouteRecordInfo<'/category/[id]', '/category/:id', { id: ParamValue }, { id: ParamValue }>,
'/item/': RouteRecordInfo<'/item/', '/item/', Record, Record>,
'/item/[id]': RouteRecordInfo<'/item/[id]', '/item/:id', { id: ParamValue }, { id: ParamValue }>,
}
}
declare module 'vue-router/auto' {
import type { RouteNamedMap } from 'vue-router/auto/routes'
export type RouterTyped = _RouterTyped
/**
* Type safe version of `RouteLocationNormalized` (the type of `to` and `from` in navigation guards).
* Allows passing the name of the route to be passed as a generic.
*/
export type RouteLocationNormalized = RouteLocationNormalizedTypedList[Name]
/**
* Type safe version of `RouteLocationNormalizedLoaded` (the return type of `useRoute()`).
* Allows passing the name of the route to be passed as a generic.
*/
export type RouteLocationNormalizedLoaded = RouteLocationNormalizedLoadedTypedList[Name]
/**
* Type safe version of `RouteLocationResolved` (the returned route of `router.resolve()`).
* Allows passing the name of the route to be passed as a generic.
*/
export type RouteLocationResolved = RouteLocationResolvedTypedList[Name]
/**
* Type safe version of `RouteLocation` . Allows passing the name of the route to be passed as a generic.
*/
export type RouteLocation = RouteLocationTypedList[Name]
/**
* Generate a type safe params for a route location. Requires the name of the route to be passed as a generic.
*/
export type RouteParams = RouteNamedMap[Name]['params']
/**
* Generate a type safe raw params for a route location. Requires the name of the route to be passed as a generic.
*/
export type RouteParamsRaw = RouteNamedMap[Name]['paramsRaw']
export function useRouter(): RouterTyped
export function useRoute(name?: Name): RouteLocationNormalizedLoadedTypedList[Name]
export const useLink: UseLinkFnTyped
export function onBeforeRouteLeave(guard: NavigationGuard): void
export function onBeforeRouteUpdate(guard: NavigationGuard): void
// Experimental Data Fetching
export function defineLoader<
P extends Promise,
Name extends keyof RouteNamedMap = keyof RouteNamedMap,
isLazy extends boolean = false,
>(
name: Name,
loader: (route: RouteLocationNormalizedLoaded) => P,
options?: _DefineLoaderOptions,
): _DataLoader, isLazy>
export function defineLoader<
P extends Promise,
isLazy extends boolean = false,
>(
loader: (route: RouteLocationNormalizedLoaded) => P,
options?: _DefineLoaderOptions,
): _DataLoader, isLazy>
export {
_definePage as definePage,
_HasDataLoaderMeta as HasDataLoaderMeta,
_setupDataFetchingGuard as setupDataFetchingGuard,
_stopDataFetchingScope as stopDataFetchingScope,
} from 'unplugin-vue-router/runtime'
}
declare module 'vue-router' {
import type { RouteNamedMap } from 'vue-router/auto/routes'
export interface TypesConfig {
beforeRouteUpdate: NavigationGuard
beforeRouteLeave: NavigationGuard
$route: RouteLocationNormalizedLoadedTypedList[keyof RouteNamedMap]
$router: _RouterTyped
RouterLink: RouterLinkTyped
}
}