import type { Page } from 'playwright';
import type { Protocol } from 'playwright-core/types/protocol';
import { type Result } from 'option-t/plain_result';
export interface CDPSession {
    start(): Promise<void>;
    finish(): Promise<Result<void, Error>>;
    send<T extends keyof Protocol.CommandParameters>(method: T, params: Protocol.CommandParameters[T]): Promise<Result<Protocol.CommandReturnValues[T], Error>>;
}
export declare class CDPSessionNotFoundError extends Error {
    message: string;
}
export declare class CDPSessionByPlaywright implements CDPSession {
    private readonly page;
    private session;
    constructor(page: Page);
    start(): Promise<void>;
    finish(): Promise<import("option-t/plain_result").Err<CDPSessionNotFoundError> | import("option-t/plain_result").Ok<undefined>>;
    send<T extends keyof Protocol.CommandParameters>(method: T, params: Protocol.CommandParameters[T]): Promise<Result<Protocol.CommandReturnValues[T], Error>>;
}
//# sourceMappingURL=cdp.d.ts.map