We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 275e713 commit 7349b5eCopy full SHA for 7349b5e
1 file changed
web/src/routes/routes.ts
@@ -102,7 +102,9 @@ type ExtractRouteParams<T extends string> = T extends `${string}:${infer Param}/
102
* If no params, returns {}; otherwise returns record of required params.
103
*/
104
type RouteParams<Path extends string> =
105
- ExtractRouteParams<Path> extends never ? {} : { [P in ExtractRouteParams<Path>]: string | number };
+ ExtractRouteParams<Path> extends never
106
+ ? Record<string, never>
107
+ : { [P in ExtractRouteParams<Path>]: string | number };
108
109
/**
110
* Type-safe route path generator. (wraps react-router's generatePath)
0 commit comments