MiddlewareFunction
Type Alias: MiddlewareFunction<Context>
Section titled “Type Alias: MiddlewareFunction<Context>”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.
Type Parameters
Section titled “Type Parameters”Context
Section titled “Context”Context extends BaseInteractionContext = BaseInteractionContext
Parameters
Section titled “Parameters”context
Section titled “context”Context
() => Promise<void>
Returns
Section titled “Returns”Promise<Response | void> | Response | void
