@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) • 654 B
TypeScript
import type { Middleware } from '@chubbyts/chubbyts-http-types/dist/middleware';
import type { Match } from '../router/route-matcher.js';
/**
* ```ts
* import type { Middleware } from '@chubbyts/chubbyts-http-types/dist/middleware';
* import type { Match } from '@chubbyts/chubbyts-framework/dist/router/route-matcher';
* import { createRouteMatcherMiddleware } from '@chubbyts/chubbyts-framework/dist/middleware/route-matcher-middleware';
*
* const match: Match = ...;
*
* const routeMatcherMiddleware: Middleware = createRouteMatcherMiddleware(match);
* ```
*/
export declare const createRouteMatcherMiddleware: (match: Match) => Middleware;