<commit_before>declare module 'puppeteer' {
  export interface ElementHandle {
    click(): Promise<void>;
  }

  export interface ResponseHeaders {
    readonly [name: string]: string;
  }

  export interface Response {
    readonly headers: ResponseHeaders;
    readonly ok: boolean;
    readonly status: number;
    readonly url: string;

    buffer(): Promise<Buffer>;
    json(): Promise<object>;
    text(): Promise<string>;
  }

  export interface NavigationOptions {
    readonly timeout?: number;
    readonly waitUntil?: 'load' | 'networkidle';
    readonly networkIdleInflight?: number;
    readonly networkIdleTimeout?: number;
  }

  export interface ClippingRegion {
    readonly x: number;
    readonly y: number;
    readonly width: number;
    readonly height: number;
  }

  export interface ScreenshotOptions {
    readonly path?: string;
    readonly type?: 'jpeg' | 'png';
    readonly quality?: number;
    readonly fullPage?: boolean;
    readonly clip?: ClippingRegion;
    readonly omitBackground?: boolean;
  }

  export interface TypeOptions {
    readonly delay?: number;
  }

  export interface Page {
    $(selector: string): Promise<ElementHandle>;
    $$(selector: string): Promise<ElementHandle[]>;
    goto(url: string, options?: NavigationOptions): Promise<Response>;
    screenshot(options?: ScreenshotOptions): Promise<Buffer>;<commit_msg>feat(puppeteer): improve puppeteer types<commit_after>declare module 'puppeteer' {
  export interface ClickOptions {
    readonly button?: 'left' | 'right' | 'middle';
    readonly clickCount?: number;
    readonly delay?: number;
  }

  export interface ElementHandle {
    click(options?: ClickOptions): Promise<void>;
  }

  export interface ResponseHeaders {
    readonly [name: string]: string;
  }

  export interface Response {
    readonly headers: ResponseHeaders;
    readonly ok: boolean;
    readonly status: number;
    readonly url: string;

    buffer(): Promise<Buffer>;
    json(): Promise<object>;
    text(): Promise<string>;
  }

  export interface NavigationOptions {
    readonly timeout?: number;
    readonly waitUntil?: 'load' | 'networkidle';
    readonly networkIdleInflight?: number;
    readonly networkIdleTimeout?: number;
  }

  export interface ClippingRegion {
    readonly x: number;
    readonly y: number;
    readonly width: number;
    readonly height: number;
  }

  export interface ScreenshotOptions {
    readonly path?: string;
    readonly type?: 'jpeg' | 'png';
    readonly quality?: number;
    readonly fullPage?: boolean;
    readonly clip?: ClippingRegion;
    readonly omitBackground?: boolean;
  }

  export interface TypeOptions {
    readonly delay?: number;
  }

  export interface Page {
    $(selector: string): Promise<ElementHandle>;
    $$(selector: string): Promise<ElementHandle[]>;
    click(selector: string, options?: ClickOptions): Promise<void>;
    focus(selector: string): Promise<void>;
    goto(url: string, options?: NavigationOptions): Promise<Response>;
    screenshot(options?: ScreenshotOptions): Promise<Buffer>;
{'fraction_non_alphanumeric': 0.1086105675146771, 'fraction_numerical': 0.0, 'mean_word_length': 3.995114006514658, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6189248', 'n_tokens_mistral': 822, 'n_tokens_neox': 796, 'n_words': 249}