From e31a2ecba75d8c2b2ab68746c3d1a7e5ad657d54 Mon Sep 17 00:00:00 2001 From: Jacob Gillespie Date: Wed, 2 Mar 2022 13:18:47 +0000 Subject: [PATCH] Fix `router()` type --- src/zap.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zap.ts b/src/zap.ts index d8cca22..a92dc1c 100644 --- a/src/zap.ts +++ b/src/zap.ts @@ -206,7 +206,7 @@ export function notFound() { // Router ---------------------------------------------------------------------- -export function router(...handlers: RouteHandler[]) { +export function router(...handlers: RouteHandler[]) { return async function (req: ServerRequest, res: ServerResponse) { for (const current of handlers) { if (req.method !== current.method) continue