https://github.com/victorgarciaesgi/nuxt-typed-router
🚦Provide autocompletion and typecheck to Nuxt router
https://github.com/victorgarciaesgi/nuxt-typed-router
nuxt nuxt-module nuxt-router nuxt-typescript nuxt3 nuxtjs typed-pages typed-router typedpages typescript vue vue-router vue-types
Last synced: about 2 months ago
JSON representation
🚦Provide autocompletion and typecheck to Nuxt router
- Host: GitHub
- URL: https://github.com/victorgarciaesgi/nuxt-typed-router
- Owner: victorgarciaesgi
- License: mit
- Created: 2020-01-08T14:03:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-21T14:23:15.000Z (4 months ago)
- Last Synced: 2025-04-13T17:46:44.980Z (3 months ago)
- Topics: nuxt, nuxt-module, nuxt-router, nuxt-typescript, nuxt3, nuxtjs, typed-pages, typed-router, typedpages, typescript, vue, vue-router, vue-types
- Language: TypeScript
- Homepage: https://nuxt-typed-router.vercel.app
- Size: 16 MB
- Stars: 372
- Watchers: 2
- Forks: 13
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
[npm-version-src]: https://img.shields.io/npm/v/nuxt-typed-router.svg
[npm-version-href]: https://www.npmjs.com/package/nuxt-typed-router
[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-typed-router.svg
[npm-total-downloads-src]: https://img.shields.io/npm/dt/nuxt-typed-router.svg
[npm-downloads-href]: https://www.npmjs.com/package/nuxt-typed-router[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![npm downloads][npm-total-downloads-src]][npm-downloads-href]## Provide a type safe router to Nuxt
- Supports all programmatic navigation utils (`NuxtLink`, `useRouter`, `navigateTo`, `useRoute`, `useLocalePath`, etc...)
- Supports optional params and catchAll routes
- Autocompletes routes paths, names and params
- Throw error if route path is invalid
- Out of the box `i18n` support
- Supports routes extended by config and modules
![]()
## Documentation
[](https://nuxt-typed-router.vercel.app/)
## Play with it
[](https://stackblitz.com/edit/github-7e4xvw?file=store/testRouter.ts)Demo repo 🧪 : [nuxt-typed-router-demo](https://github.com/victorgarciaesgi/nuxt-typed-router-demo)
## Used by
## Cool video about it from LearnVue
[](https://www.youtube.com/watch?v=jiYoAiFb71Y&t)
## Compatibility:
- Nuxt 3
## Install
```bash
npx nuxi@latest module add typed-router
```## Configuration
Register the module in the `nuxt.config.ts`, done!```ts
export default defineNuxtConfig({
modules: ['nuxt-typed-router'],
});
```## Development
1. Clone this repository
2. Install dependencies using `pnpm`
3. Build project for local tests `pnpm run test`
4. Start dev playground `pnpm run prepack && pnpm run dev`
5. Build project for deploy `pnpm prepack`## 📑 License
[MIT License](./LICENSE)