kruschid / typesafe-routes

Spices up your favorite routing library by adding type safety to plain string-based route definitions.
https://kruschid.github.io/typesafe-routes/
MIT License
102 stars 8 forks source link

0 integer value in path params is ignored #36

Closed armedi closed 1 year ago

armedi commented 1 year ago

If I create a route

const fooRoute = route("/root/:number", { number: intParser }, {});
fooRoute({ number: 0 }).$;

It's expected that the resulting path to be /root/0. But 0 is ignored so it only output /root

kruschid commented 1 year ago

should be working now, thank you for the PR