Skip to content

MiddlewareFunction

MiddlewareFunction<Context> = (context, next) => Promise<Response | void> | Response | void

Defined in: types/handlers.ts:15

Middleware function type for processing interaction contexts.

Helpful for implementing cross-cutting concerns such as logging, authentication, setting of the DB, etc.

Context extends BaseInteractionContext = BaseInteractionContext

Context

() => Promise<void>

Promise<Response | void> | Response | void