import type { Result } from "../util/result"; import type { CdpError } from "./errors"; import type { CdpEvent } from "./types"; export const DEFAULT_TIMEOUT_MS = 15_000; export type CdpTransport = { connect(url: string, opts?: { timeoutMs?: number }): Promise>; close(): Promise; request( method: string, params: Record, opts?: { sessionId?: string | null; timeoutMs?: number }, ): Promise>; events(): AsyncIterable; state(): "open" | "closed" | "connecting"; onClose(cb: () => void): () => void; };