Installation
yarn
yarn add nuxt-typed-router
Add the module to modules in your nuxt.config:
nuxt.config.ts
export default defineNuxtConfig({
modules: [
'nuxt-typed-router',
]
})
You now need to either launch dev, prepare, generate or build to generate the typings.
Now every time that you change your
pages folder, it will re-generate type definitions