/** * Single-mount adapter. Mount once via `app.express.use(createExpressAdapter(registry, app))`. * Dispatches each request through the registry: match → walk middlewares → call handler. * * Middleware instances are cached by `MiddlewareEntry` identity (WeakMap) * — each entry is constructed once on first request and reused thereafter. */ import type { NextFunction, Request, Response } from 'express'; import type { IApp } from '../../../server.ts'; import type { RouteRegistry } from './RouteRegistry.ts'; export type ExpressAdapter = (req: Request, res: Response, next: NextFunction) => Promise; export declare function createExpressAdapter(registry: RouteRegistry, app: IApp): ExpressAdapter;