Consider making RouteDefinition generic #143
danielo515
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, and thank you for this library.
I was wondering if it would be possible to make RouteDefinition generic for the route paths?
I am kinda obsessed with type safety, and I like to use an enum for all my routes. This gives me an easy refractor point and allows me to reference routes safely and with great DX.
It will be cool if RouteDefinition can accept the type (an enum, or sum type) on the expected paths and make sure you don't provide any invalid one.
Thanks and regards
Beta Was this translation helpful? Give feedback.
All reactions