import type { Request, Response } from 'express'; /** * Per-request store for `response()` and `request()` helpers. */ export interface HttpContextStore { /** Current Express request. */ req: Request; /** Current Express response. */ res: Response; } /** * Run a callback with HTTP context active (used by {@link Application.boot} middleware). * * @param store - Request and response for this request. * @param fn - Synchronous entry; async work inside must be scheduled from this turn to keep ALS. * @returns The callback return value. */ export declare function runWithHttpContext(store: HttpContextStore, fn: () => T): T; /** * Current request/response pair, or `undefined` outside the HTTP middleware stack. */ export declare function tryGetHttpContext(): HttpContextStore | undefined; /** * @throws Error when called outside an active HTTP context (e.g. before {@link Application.boot} or without passing `res` to {@link response}). */ export declare function getHttpContext(): HttpContextStore; //# sourceMappingURL=httpContext.d.ts.map