Skip to content

Commit

Permalink
Revert types fix the call
Browse files Browse the repository at this point in the history
  • Loading branch information
istarkov committed Jul 6, 2024
1 parent 6d4f632 commit ba03082
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/AutoRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const AutoRouter = <
catch: error,
finally: [
// @ts-ignore
(r: any, ...args) => r ?? missing(r, ...args),
(r: any, ...args) => r ?? missing(...args),
format,
...f,
],
Expand Down
10 changes: 7 additions & 3 deletions src/types/AutoRouterOptions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { RequestHandler } from './RequestHandler'
import { ResponseHandler } from './ResponseHandler'
import { RouterOptions } from './RouterOptions'

export type AutoRouterOptions<RequestType, Args extends any[]> = {
missing?: ResponseHandler<any, RequestType, Args>
export type AutoRouterOptions<
RequestType,
Args extends any[],
> = {
missing?: RequestHandler<RequestType, Args>
format?: ResponseHandler
} & RouterOptions<RequestType, Args>
} & RouterOptions<RequestType, Args>

0 comments on commit ba03082

Please sign in to comment.