@chubbyts/chubbyts-framework
Version:
A minimal, highly performant middleware PSR-15 inspired function based microframework built with as little complexity as possible, aimed primarily at those developers who want to understand all the vendors they use.
15 lines (14 loc) • 711 B
TypeScript
import type { Handler } from '@chubbyts/chubbyts-http-types/dist/handler';
import type { MiddlewareDispatcher } from '../middleware/middleware-dispatcher.js';
/**
* ```ts
* import type { Handler } from '@chubbyts/chubbyts-http-types/dist/handler';
* import { createRouteHandler } from '@chubbyts/chubbyts-framework/dist/handler/route-handler';
* import type { MiddlewareDispatcher } from '@chubbyts/chubbyts-framework/dist/middleware/middleware-dispatcher';
*
* const middlewareDispatcher: MiddlewareDispatcher = ...;
*
* const routeHandler: Handler = createRouteHandler(middlewareDispatcher);
* ```
*/
export declare const createRouteHandler: (middlewareDispatcher: MiddlewareDispatcher) => Handler;