Skip to content

Commit

Permalink
fix: incorrect typings for PathParam when path is /*
Browse files Browse the repository at this point in the history
paramName for the splat wasn't correctly resolved when the pas is `/*`
  • Loading branch information
Obi-Dann committed Feb 9, 2023
1 parent 4440090 commit eef790c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/router/utils.ts
Expand Up @@ -217,7 +217,7 @@ type _PathParam<Path extends string> =
*/
type PathParam<Path extends string> =
// check if path is just a wildcard
Path extends "*"
Path extends "*" | "/*"
? "*"
: // look for wildcard at the end of the path
Path extends `${infer Rest}/*`
Expand Down

0 comments on commit eef790c

Please sign in to comment.