Installation

yarn
yarn add nuxt-typed-router
pnpm
pnpm install nuxt-typed-router
npm
npm install 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 lunch dev, prepare, generate or build to generate the typings.

Now every time that you change your pages folder, it will re-generate type definitions