diff --git a/docs/guide/advanced/meta.md b/docs/guide/advanced/meta.md index 8b3af93ef..cfd9c11e3 100644 --- a/docs/guide/advanced/meta.md +++ b/docs/guide/advanced/meta.md @@ -58,10 +58,14 @@ router.beforeEach((to, from) => { ## TypeScript -It is possible to type the meta field by extending the `RouteMeta` interface: +It is possible to type the meta field by extending the `RouteMeta` interface from `vue-router`: ```ts -// typings.d.ts or router.ts +// This can be directly added to any of your `.ts` files like `router.ts` +// It can also be added to a `.d.ts` file, in which case you will need to add an export +// to ensure it is treated as a module +export {} + import 'vue-router' declare module 'vue-router' {