Skip to content

Commit

Permalink
Fix router() type
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie committed Mar 2, 2022
1 parent 6f045b6 commit e31a2ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export function notFound() {

// Router ----------------------------------------------------------------------

export function router(...handlers: RouteHandler[]) {
export function router(...handlers: RouteHandler<HttpMethod, any, ResponseBodyType>[]) {
return async function (req: ServerRequest, res: ServerResponse) {
for (const current of handlers) {
if (req.method !== current.method) continue
Expand Down

0 comments on commit e31a2ec

Please sign in to comment.