next-type-safe-routes icon indicating copy to clipboard operation
next-type-safe-routes copied to clipboard

Never should your users experience broken links again!

Results 12 next-type-safe-routes issues
Sort by recently updated
recently updated
newest added

I have a simple project with no API. When this plugin added I'm getting this error ``` no such file or directory, lstat '/pages/api` ``` As a workaround – I've...

Hi, great package, however I'd like to know how this differs with TRPC, which also offers type-safety for server routes, which also has a NextJs integration: https://trpc.io/docs/nextjs Would love to...

Hi. Thanks for great library. Could i know if you have plan to support app dir in next 13 ? Thanks.

Right now if you do something like this: ```typescript getRoute({ route: '/my-page', query: { thing: undefined, } }); ``` You get this: `/my-page?thing=undefined` Would it make sense to just exclude...

For some reason, the types are written multiple times: ![image](https://user-images.githubusercontent.com/9532512/113933440-e386aa80-97f4-11eb-9411-f7d3f2527273.png)

bug

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 under ```shell apps/ appname/ __generated__/ ts-gql/ .* src/ pages/ components/ services/ etc/ etc/...

enhancement

Supercedes #33 Closes #32 - Adds a configurable output directory to the plugin - Docs for that - Tightens up typings with strictness Worked locally on my project.

fixes #32 make destination configurable. be warned, this is a really rough first pass at this. ```es6 // next.config.js import withTypeSafeRoutes from 'next-type-safe-routes/plugin'; withTypeSafeRoutes({ nextTypeSafeRoutes: { destination: '__generated__/next-type-safe-routes/', } });...

This is irrelevant if we go with #21 , but right now the `getRoute` function refers to the catch-all part of a route to be `path`, ignoring the name in...

In TypeScript, you can use template literal types for strings: ``` type UserRoutePath = `/users/${string}`; type UserLikesRoutePath = `/users/${string}/likes`; type TeamRoutePath = `/teams/${string}`; type Routes = UserRoutePath | UserLikesRoutePath |...