import { RequestHandler } from '@hattip/compose'; import { HattipHandler as HattipHandler$1, AdapterRequestContext } from '@hattip/core'; import { contextSymbol, UniversalFn, UniversalHandler, UniversalMiddleware, Get, RuntimeAdapter, UniversalRouter, UniversalRouterInterface, EnhancedMiddleware } from '@universal-middleware/core'; import { Router } from '@hattip/router'; declare module "@hattip/core" { interface AdapterRequestContext { [contextSymbol]?: Universal.Context; } } type HattipHandler = UniversalFn, HattipHandler$1>; type HattipMiddleware = UniversalFn, RequestHandler>; /** * Creates a request handler to be passed to hattip */ declare function createHandler(handlerFactory: Get>): Get>; /** * Creates a middleware to be passed to @hattip/compose or @hattip/router */ declare function createMiddleware(middlewareFactory: Get>): Get>; declare function getContext(context: AdapterRequestContext): InContext; declare function getRuntime(context: AdapterRequestContext): RuntimeAdapter; type App = Router; type EnhancedMiddlewareHattip = EnhancedMiddleware | EnhancedMiddleware; declare class UniversalHattipRouter extends UniversalRouter implements UniversalRouterInterface { #private; constructor(app: App); use(middleware: EnhancedMiddlewareHattip): this; applyCatchAll(): this; } declare function apply(app: App, middlewares: EnhancedMiddlewareHattip[]): void; export { type App, type HattipHandler, type HattipMiddleware, UniversalHattipRouter, apply, createHandler, createMiddleware, getContext, getRuntime };