Skip to content

Commit b56a97d

Browse files
authored
fix(next): fix type inference for createSingleRouteHandler (#597)
1 parent 7792ef7 commit b56a97d

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎.changeset/gold-moles-sell.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@ts-rest/next': patch
3+
---
4+
5+
Fix type inference for `createSingleRouteHandler`

‎libs/ts-rest/next/src/lib/ts-rest-next.ts‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,9 @@ export const createNextRouter = <T extends AppRouter>(
231231
* ```typescript
232232
* export default createNextRouter(contract, implementationHandler);
233233
* ```
234-
*
235-
* @param appRoute
236-
* @param options
237-
* @returns
238234
*/
239235
export function createSingleRouteHandler<T extends AppRoute>(
240-
appRoute: AppRoute,
236+
appRoute: T,
241237
implementationHandler: AppRouteImplementation<T>,
242238
options?: CreateNextRouterOptions,
243239
) {

0 commit comments

Comments
 (0)