danielr18 / connected-next-router

A Redux binding for Next.js Router compatible with Next.js.
MIT License
109 stars 30 forks source link

Export a NextRouterState type for TypeScript? #86

Closed JoshuaKGoldberg closed 2 years ago

JoshuaKGoldberg commented 2 years ago

Hi, I just found this library while converting an app written in TypeScript from CRA+react-router to Next.js. Thank you so much for saving me from having to refactor a bunch! 💖

One small point: there's no good exported type I can find for the router part of state. Back in connected-react-router land we had RouterState. Could this library please export an equivalent?

It looks like https://github.com/danielr18/connected-next-router/blob/c2b078701d9fdb2ace652dd0a5603dc5b748a30e/src/types.ts#L10 is what I'm looking for? But it's not exported right now.