Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 1.23 KB

README.md

File metadata and controls

25 lines (17 loc) · 1.23 KB

Next Typed Routes

These packages make routing in next.js intuitive and type-safe.

This projects functions as a replacement for the typedRoutes experimental next.js feature untill the interface becomes easier to use. The discussion to improve the next.js feature can be found here.

WIP: The package is fully functional but the API is subject to change.

Features

  • Analyze next.js routes and generate types with the ntr command.
  • Use the routing types in the lib to make routing type safe.
  • Type safe query parameters.
  • Type safe API calls to next.js route APIs.

This is the main package of this monorepo and contains the TypeScript code for the npm package.

For documentation on the library go to the README in /lib.

The ntr command

This command generates type information about the routes in the next.js project.

A version matching with the library is released on every v*.*.* tag via github actions.

For documentation on its usage with the library go to the README in /lib.