import type { Page } from 'playwright'; /** * Name of the function a watched page calls to wait for the next arrival. * * Long for the reason `AGENT_GLOBAL` is: it shares a namespace with the * application. */ export declare const ARRIVAL_GLOBAL = "__variance_authority_arrival__"; /** * The URLs a watched page's agent is waiting on, oldest first: the requests * still arriving of the kind it asked for, while it waits. None for a page * nobody watches, or whose agent is not waiting on the wire. * * What a run that stopped while a page agent waited on the wire has to say * about it: the request that kept it waiting. A request that is open while the * agent is doing something else, a long poll beside a failed read, is not why * it stopped. */ export declare function stillArriving(page: Page): readonly string[]; /** * Let the page ask whether anything it requested is still arriving, and wait * for it when something is. * * The page installs `globalThis[ARRIVAL_GLOBAL]`, which resolves `true` once * the next request in flight has finished or failed, and `false` at once when * none is. Called with `'script'`, it answers only for scripts in flight: a * page waiting for a renderer to arrive is waiting on nothing else. Asked by a * page agent that is waiting on something only the outside can settle — a * hydration suspended on a chunk or a payload, a client that has not created * its root — so that the wait is as long as the wire is busy and not a moment * longer, with no clock deciding either. * * Every request the page sends that can carry what a render waits on, because * that can be any of them: a module, a JSON payload, a stylesheet, a stream. * Watched from the page's own events rather than from a route, so it costs * nothing per request and sees requests no route handler continues. * * A request that never ends — a long poll — keeps the answer `true` for as long * as it is open. A wait that follows it is following a page that is still * receiving, which is the truth about it, and a run that ends it names the * request ({@link stillArriving}). Channels open by design, and assets, are * not counted. */ export declare function watchArrivals(page: Page): Promise; //# sourceMappingURL=arrivals.d.ts.map