{{ post.title }}
{{ post.body }}
User: {{ route.params.id }}
isLoading: {{ isLoading }}
Error: {{ error }}
{{ user == null ? String(user) : user }}
User: {{ route.params.id }}
status: {{ status }}
isLoading: {{ isLoading }}
Error: {{ error }}
{{ user == null ? String(user) : user }}
{{ post.body }}
{{ post.body }}
Loading...
{{ error.message }}
{{ user }}
{{ error.message }}
``` If you want to be even stricter, you can override the default `Error` type with `unknown` (or anything else) by augmenting the `TypesConfig` interface. ```ts // types-extension.d.ts import 'vue-router' export {} declare module 'vue-router' { interface TypesConfig { Error: unknown } } ``` --- --- url: /file-based-routing/eslint.md --- # ESLint If you are not using auto imports, you will need to tell ESLint about `vue-router/auto-routes`. Add these lines to your eslint configuration: ```json{3} { "settings": { "import/core-modules": ["vue-router/auto-routes"] } } ``` ## `definePage()` Since `definePage()` is a global macro, you need to tell ESLint about it. Add these lines to your eslint configuration: ```json{3} { "globals": { "definePage": "readonly" } } ``` --- --- url: /guide/advanced/extending-router-link.md --- # Extending RouterLink The RouterLink component exposes enough `props` to suffice most basic applications but it doesn't try to cover every possible use case and you will likely find yourself using `v-slot` for some advanced cases. In most medium to large sized applications, it's worth creating one if not multiple custom RouterLink components to reuse them across your application. Some examples are Links in a Navigation Menu, handling external links, adding an `inactive-class`, etc. Let's extend RouterLink to handle external links as well and adding a custom `inactive-class` in an `AppLink.vue` file: ::: code-group ```vue [Composition API]In Vue Router 3, I render inside the route component
In Vue Router 3, I render inside the route component
Some slotted content