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
@blakeembrey would you mind elaborating on the imperative behind that design decision? As a user this seems quite unintuitive. A more ergonomic API instead, might be to include the optional parameter with it's proper type i.e group and the remaning parameters thus only once. Currently keys can be a wildcard or a parameter, but there's no indication of which parameters might be optional. The naive approach would be parsing the array of keys and look for repeated keys to infer which keys might be optional. This seems quite error prone to be honest.
Keys array returned form
pathToRegexp
has unexpected entries when path has optional parts.When one part is changed to optional, keys array unexpectedly grows. I'd expect both cases to return keys array with 3 entries.
The text was updated successfully, but these errors were encountered: