Files
blog/typed-router.d.ts

87 lines
2.7 KiB
TypeScript

/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// 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.
declare module 'vue-router/auto-routes' {
import type {
RouteRecordInfo,
ParamValue,
ParamValueOneOrMore,
ParamValueZeroOrMore,
ParamValueZeroOrOne,
} from 'vue-router'
/**
* Route name map generated by unplugin-vue-router
*/
export interface RouteNamedMap {
'appshare': RouteRecordInfo<'appshare', '/AppShare', Record<never, never>, Record<never, never>>,
'article': RouteRecordInfo<'article', '/Article', Record<never, never>, Record<never, never>>,
'gallery': RouteRecordInfo<'gallery', '/Gallery', Record<never, never>, Record<never, never>>,
'home': RouteRecordInfo<'home', '/Home', Record<never, never>, Record<never, never>>,
'login': RouteRecordInfo<'login', '/Login', Record<never, never>, Record<never, never>>,
'404': RouteRecordInfo<'404', '/NotFound', Record<never, never>, Record<never, never>>,
'plink': RouteRecordInfo<'plink', '/Plink', Record<never, never>, Record<never, never>>,
'widget': RouteRecordInfo<'widget', '/Widget', Record<never, never>, Record<never, never>>,
}
/**
* Route file to route info map by unplugin-vue-router.
* Used by the volar plugin to automatically type useRoute()
*
* Each key is a file path relative to the project root with 2 properties:
* - routes: union of route names of the possible routes when in this page (passed to useRoute<...>())
* - views: names of nested views (can be passed to <RouterView name="...">)
*
* @internal
*/
export interface _RouteFileInfoMap {
'src/views/AppShare.vue': {
routes: 'appshare'
views: never
}
'src/views/Article.vue': {
routes: 'article'
views: never
}
'src/views/Gallery.vue': {
routes: 'gallery'
views: never
}
'src/views/Home.vue': {
routes: 'home'
views: never
}
'src/views/Login.vue': {
routes: 'login'
views: never
}
'src/views/NotFound.vue': {
routes: '404'
views: never
}
'src/views/Plink.vue': {
routes: 'plink'
views: never
}
'src/views/Widget.vue': {
routes: 'widget'
views: never
}
}
/**
* Get a union of possible route names in a certain route component file.
* Used by the volar plugin to automatically type useRoute()
*
* @internal
*/
export type _RouteNamesForFilePath<FilePath extends string> =
_RouteFileInfoMap extends Record<FilePath, infer Info>
? Info['routes']
: keyof RouteNamedMap
}