export interface DocumentLoadOptions { /** Total milliseconds from starting this document's download through its initial rendered readiness. */ timeoutMs?: number; /** Cancels only the initial load. Aborting after readiness does not close the document. */ signal?: AbortSignal; } export declare class DocumentLoadError extends Error { readonly code: 'DOCUMENT_LOAD_TIMEOUT' | 'DOCUMENT_LOAD_CANCELLED'; readonly documentId?: string | undefined; readonly name = "DocumentLoadError"; constructor(code: 'DOCUMENT_LOAD_TIMEOUT' | 'DOCUMENT_LOAD_CANCELLED', documentId?: string | undefined); } /** One document lifetime. Omitted configuration creates no timer, controller or listener. */ export declare function createDocumentLoadScope(options?: DocumentLoadOptions, documentId?: string): { signal: AbortSignal; wait(task: Promise): Promise; assertActive(): void; finish(): boolean; cancel: () => void; onSettled(listener: () => void): void; onFailure(listener: (error: DocumentLoadError) => void): () => boolean; } | undefined;