export type WaitUntil = (promise: Promise) => void; export declare const BACKGROUND_DEADLINE_MS = 250; /** * The platform's waitUntil for this request. Nitro's Netlify entry drops the * function context, but the runtime still keeps it in the AsyncLocalStorage * that `getContext()` from `@netlify/functions` reads, under this global symbol. */ export declare function platformWaitUntil(req?: unknown): WaitUntil | undefined; /** * Keeps work alive past the response without holding it: handed to the * platform when it has waitUntil, otherwise awaited for at most * BACKGROUND_DEADLINE_MS. Work still running after the deadline keeps running * in this process, but a freeze can cut it short, so only best-effort work * belongs here. Writes that a polling client reads back are awaited instead. */ export declare function runInBackground(work: Promise, waitUntil: WaitUntil | undefined): Promise;