-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathtyped-router.d.ts
More file actions
182 lines (176 loc) · 4.42 KB
/
typed-router.d.ts
File metadata and controls
182 lines (176 loc) · 4.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/* eslint-disable */
/* prettier-ignore */
// oxfmt-ignore
// @ts-nocheck
// noinspection ES6UnusedImports
// Generated by 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 {
RouteRecordInfo,
ParamValue,
ParamValueOneOrMore,
ParamValueZeroOrMore,
ParamValueZeroOrOne,
} from 'vue-router'
declare module 'vue-router' {
interface TypesConfig {
ParamParsers: never
}
}
declare module 'vue-router/auto-routes' {
/**
* Route name map generated by vue-router
*/
export interface RouteNamedMap {
'/(main)': RouteRecordInfo<
'/(main)',
'/',
Record<never, never>,
Record<never, never>,
| '/(main)/dashboard/default'
| '/(main)/starter'
| '/(main)/utils/color'
| '/(main)/utils/shadow'
| '/(main)/utils/typography'
>,
'/(main)/dashboard/default': RouteRecordInfo<
'/(main)/dashboard/default',
'/dashboard/default',
Record<never, never>,
Record<never, never>,
| never
>,
'/(main)/starter': RouteRecordInfo<
'/(main)/starter',
'/starter',
Record<never, never>,
Record<never, never>,
| never
>,
'/(main)/utils/color': RouteRecordInfo<
'/(main)/utils/color',
'/utils/color',
Record<never, never>,
Record<never, never>,
| never
>,
'/(main)/utils/shadow': RouteRecordInfo<
'/(main)/utils/shadow',
'/utils/shadow',
Record<never, never>,
Record<never, never>,
| never
>,
'/(main)/utils/typography': RouteRecordInfo<
'/(main)/utils/typography',
'/utils/typography',
Record<never, never>,
Record<never, never>,
| never
>,
'/authentication/login': RouteRecordInfo<
'/authentication/login',
'/authentication/login',
Record<never, never>,
Record<never, never>,
| never
>,
'/authentication/register': RouteRecordInfo<
'/authentication/register',
'/authentication/register',
Record<never, never>,
Record<never, never>,
| never
>,
'/maintenance/error': RouteRecordInfo<
'/maintenance/error',
'/maintenance/error',
Record<never, never>,
Record<never, never>,
| never
>,
}
/**
* Route file to route info map by vue-router.
* Used by the \`sfc-typed-router\` 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/pages/(main).vue': {
routes:
| '/(main)'
| '/(main)/dashboard/default'
| '/(main)/starter'
| '/(main)/utils/color'
| '/(main)/utils/shadow'
| '/(main)/utils/typography'
views:
| 'default'
}
'src/pages/(main)/dashboard/default.vue': {
routes:
| '/(main)/dashboard/default'
views:
| never
}
'src/pages/(main)/starter.vue': {
routes:
| '/(main)/starter'
views:
| never
}
'src/pages/(main)/utils/color.vue': {
routes:
| '/(main)/utils/color'
views:
| never
}
'src/pages/(main)/utils/shadow.vue': {
routes:
| '/(main)/utils/shadow'
views:
| never
}
'src/pages/(main)/utils/typography.vue': {
routes:
| '/(main)/utils/typography'
views:
| never
}
'src/pages/authentication/login.vue': {
routes:
| '/authentication/login'
views:
| never
}
'src/pages/authentication/register.vue': {
routes:
| '/authentication/register'
views:
| never
}
'src/pages/maintenance/error.vue': {
routes:
| '/maintenance/error'
views:
| never
}
}
/**
* Get a union of possible route names in a certain route component file.
* Used by the \`sfc-typed-router\` Volar plugin to automatically type \`useRoute()\`.
*
* @internal
*/
export type _RouteNamesForFilePath<FilePath extends string> =
_RouteFileInfoMap extends Record<FilePath, infer Info>
? Info['routes']
: keyof RouteNamedMap
}
export {}