Skip to content

Commit e31a2ec

Browse files
Fix router() type
1 parent 6f045b6 commit e31a2ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export function notFound() {
206206

207207
// Router ----------------------------------------------------------------------
208208

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

0 commit comments

Comments
 (0)