import type { Context, Middleware } from "@nifrajs/core/server"; /** * Store the current nifra `Context` in `AsyncLocalStorage` for helpers that run away from the handler * argument, e.g. repository/logger functions called deep in the stack. * * Import from `@nifrajs/middleware/context-storage` so ordinary `@nifrajs/middleware` imports stay * node-compat-free on edge runtimes. The runtime must support `node:async_hooks` AsyncLocalStorage. */ export declare function contextStorage(): Middleware; /** Return the current request context, or throw when no context-storage wrapper is active. */ export declare function getContext(): C; /** Return the current request context, or `undefined` outside a context-storage request. */ export declare function tryGetContext(): C | undefined; //# sourceMappingURL=context-storage.d.ts.map