You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for rising the issue! We were considering this feature, however we came to conclusion that in order to implement that we would need to make too many assumptions and it can't be made type safe without domain knowledge. That suggests that responsibility of parsing paths and ensuring that it's of correct type is entirely on the user of the library.
We'd really welcome a PR or at least a draft which would show your proposal for that.
Our main problem is how to revive the value - for example path-to-regexp's match returns all the parameters as string. That means we either return all the params as string which is only half usefull because you still need to make the conversion yourself or we provide some complex mechanism of reviving in the ts-routes. That however increases complexicity especially for custom segments.
We think it's doable however just not sure if using path-to-regexpmatch directly and figuring out solutions to those problems should be part of this library. We're open to discussion.
It would be nice to have an API to parse parameters back from path.
As example:
The text was updated successfully, but these errors were encountered: