UNPKG

@chubbyjs/chubbyjs-framework

Version:

A minimal, highly performant middleware PSR-15 microframework built with as little complexity as possible, aimed primarily at those developers who want to understand all the vendors they use.

11 lines (10 loc) 734 B
import MiddlewareInterface from '@chubbyjs/psr-http-server-middleware/dist/MiddlewareInterface'; import RequestHandlerInterface from '@chubbyjs/psr-http-server-handler/dist/RequestHandlerInterface'; import ServerRequestInterface from '@chubbyjs/psr-http-message/dist/ServerRequestInterface'; import ResponseInterface from '@chubbyjs/psr-http-message/dist/ResponseInterface'; declare class CallbackMiddleware implements MiddlewareInterface { private callback; constructor(callback: (request: ServerRequestInterface, handler: RequestHandlerInterface) => Promise<ResponseInterface>); process(request: ServerRequestInterface, handler: RequestHandlerInterface): Promise<ResponseInterface>; } export default CallbackMiddleware;