Type alias Middleware

Middleware: ((params, handlerFn?) => Response | Middleware | Promise<Middleware | Response | undefined>)

A middleware (or route handler) function. Receives the request context and either returns a Response to short-circuit the chain, or a falsy value to pass control to the next middleware.

Type declaration

Generated using TypeDoc