lukeed / regexparam

A tiny (394B) utility that converts route patterns into RegExp. Limited alternative to `path-to-regexp` 🙇‍♂️
MIT License
567 stars 23 forks source link

fix(types): exclude file extension from inferred param name #19

Closed aleclarson closed 2 years ago

aleclarson commented 2 years ago

Previously, the RouteParams type would include the file extension in the parameter name.

type Example = RouteParams<"/:name.webp">
// Before: { "name.webp": string }
// After:  { name: string }