Skip to content

Commit

Permalink
chore: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Jul 6, 2022
1 parent 7a6af3a commit 03bba1a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion playground/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createWebHistory, createRouter } from '@vue-router'

const router = createRouter({
extendRoutes: (routes) => {
routes.find((r) => r.name === '/')!.meta = {}
// routes.find((r) => r.name === '/')!.meta = {}
return routes
},
history: createWebHistory(),
Expand Down
4 changes: 4 additions & 0 deletions playground/src/routes/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
<h1>Home</h1>
</main>
</template>

<route lang="json">
{ "name": "home" }
</route>
2 changes: 1 addition & 1 deletion playground/typed-router.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type {

declare module '@vue-router/routes' {
export interface RouteNamedMap {
'/': RouteRecordInfo<'/', '/', Record<never, never>, Record<never, never>>,
'home': RouteRecordInfo<'home', '/', Record<never, never>, Record<never, never>>,
'/[name]': RouteRecordInfo<'/[name]', '/:name', { name: ParamValue<true> }, { name: ParamValue<false> }>,
'/[...path]': RouteRecordInfo<'/[...path]', '/:path(.*)', { path: ParamValue<true> }, { path: ParamValue<false> }>,
'/about': RouteRecordInfo<'/about', '/about', Record<never, never>, Record<never, never>>,
Expand Down

0 comments on commit 03bba1a

Please sign in to comment.