@@ -9,8 +9,8 @@ It's possible to configure the router to have a _map_ of typed routes. While thi
99Here is an example of how to manually configure typed routes:
1010
1111``` ts
12- // import the `RouteRecordInfo` and `RouteMeta` type from vue-router to type your routes
13- import type { RouteRecordInfo , RouteMeta } from ' vue-router'
12+ // import the `RouteRecordInfo` type from vue-router to type your routes
13+ import type { RouteRecordInfo } from ' vue-router'
1414
1515// Define an interface of routes
1616export interface RouteNamedMap {
@@ -24,8 +24,6 @@ export interface RouteNamedMap {
2424 Record <never , never >,
2525 // these are the normalized params
2626 Record <never , never >,
27- // these are the `meta` fields
28- RouteMeta ,
2927 // this is a union of all children route names
3028 never
3129 >
@@ -36,31 +34,27 @@ export interface RouteNamedMap {
3634 ' /:name' ,
3735 { name: string | number }, // raw value
3836 { name: string }, // normalized value
39- RouteMeta ,
4037 ' named-param-edit'
4138 >
4239 ' named-param-edit' : RouteRecordInfo <
4340 ' named-param-edit' ,
4441 ' /:name/edit' ,
4542 { name: string | number }, // raw value
4643 { name: string }, // normalized value
47- RouteMeta ,
4844 never
4945 >
5046 ' article-details' : RouteRecordInfo <
5147 ' article-details' ,
5248 ' /articles/:id+' ,
5349 { id: Array <number | string > },
5450 { id: string [] },
55- RouteMeta ,
5651 never
5752 >
5853 ' not-found' : RouteRecordInfo <
5954 ' not-found' ,
6055 ' /:path(.*)' ,
6156 { path: string },
6257 { path: string },
63- RouteMeta ,
6458 never
6559 >
6660}
0 commit comments