Skip to content

Commit abc918f

Browse files
docs: improve meta extending (#1360)
Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com>
1 parent e919c1d commit abc918f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/guide/advanced/meta.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,14 @@ router.beforeEach((to, from) => {
5858

5959
## TypeScript
6060

61-
It is possible to type the meta field by extending the `RouteMeta` interface:
61+
It is possible to type the meta field by extending the `RouteMeta` interface from `vue-router`:
6262

6363
```ts
64-
// typings.d.ts or router.ts
64+
// This can be directly added to any of your `.ts` files like `router.ts`
65+
// It can also be added to a `.d.ts` file, in which case you will need to add an export
66+
// to ensure it is treated as a module
67+
export {}
68+
6569
import 'vue-router'
6670

6771
declare module 'vue-router' {

0 commit comments

Comments
 (0)