Open airtonix opened 2 years ago
I have another reason this is a good idea - I would love to be able to reference valid paths from another project that has redirects/API access to my NextJS project, and I use a monorepo structure - so it would be super cool if the definitions could even be sent outside the project to such a subpackage, so that I can use the getRoute()
helper fully outside of NextJS (rather than needing to have all of the NextJS project as a dependency).
https://github.com/ckastbjerg/next-type-safe-routes/blob/e181640ec23c4eefad0b94e776c983a630281ab8/src/plugin/index.ts#L37
in our nextjs projects we write out other generated typescript
.d.ts
files for our gql schema underwe'd like to put our route types: