import { CallContextLike } from '@xh/hoist/core'; import type { FetchOptions } from '../FetchService'; /** * Post a JSON body, using `fetch({keepalive: true})` when the page is no longer visible so the * request can survive teardown (e.g. a flush as `XH.pageState` goes `hidden`/`frozen`/`terminated`). * * Keepalive bodies share a single browser-wide 64KB budget; if exceeded the request is never sent * and we retry once uncapped (without keepalive), which still completes while the page is alive (the * common `hidden` case). Real server errors are re-thrown, not re-posted. * * @internal */ export declare function terminationSafePostJson(opts: FetchOptions, ctx?: CallContextLike): Promise;