We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
router()
1 parent 6f045b6 commit e31a2ecCopy full SHA for e31a2ec
src/zap.ts
@@ -206,7 +206,7 @@ export function notFound() {
206
207
// Router ----------------------------------------------------------------------
208
209
-export function router(...handlers: RouteHandler[]) {
+export function router(...handlers: RouteHandler<HttpMethod, any, ResponseBodyType>[]) {
210
return async function (req: ServerRequest, res: ServerResponse) {
211
for (const current of handlers) {
212
if (req.method !== current.method) continue
0 commit comments