//#region src/utils/wait-until.d.ts type WaitUntilFn = (promise: Promise) => void; /** * Lazy-load and cache Vercel's `waitUntil` function. * * - On Vercel (`process.env.VERCEL` set): dynamically imports `@vercel/functions` * and returns `waitUntil`, which extends the serverless function lifetime * past the HTTP response so background work can complete. * - Outside Vercel: returns `undefined`. Callers should let the promise * execute naturally via the Node.js event loop (fire-and-forget with * error handling). * - Import failure: logs a warning and returns `undefined` (graceful degradation). * - Result is cached after first call (lazy singleton). Concurrent callers * share the same import promise to avoid duplicate imports. */ declare function getWaitUntil(): Promise; /** * Reset internal cache. Exposed only for testing. */ declare function _resetWaitUntilCache(): void; //#endregion export { _resetWaitUntilCache, getWaitUntil };