Skip to content

Commit 7349b5e

Browse files
committed
Fix typing error from linter
1 parent 275e713 commit 7349b5e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

web/src/routes/routes.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ type ExtractRouteParams<T extends string> = T extends `${string}:${infer Param}/
102102
* If no params, returns {}; otherwise returns record of required params.
103103
*/
104104
type RouteParams<Path extends string> =
105-
ExtractRouteParams<Path> extends never ? {} : { [P in ExtractRouteParams<Path>]: string | number };
105+
ExtractRouteParams<Path> extends never
106+
? Record<string, never>
107+
: { [P in ExtractRouteParams<Path>]: string | number };
106108

107109
/**
108110
* Type-safe route path generator. (wraps react-router's generatePath)

0 commit comments

Comments
 (0)