sindresorhus / capture-website

Capture screenshots of websites
MIT License
1.93k stars 137 forks source link

launchOptions must be extended #86

Closed kaihaase closed 3 years ago

kaihaase commented 3 years ago

The launch function of Puppeteer in version 9.1.1. is declared as follows:

export declare function launch(options?: LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions & {
    product?: Product;
    extraPrefsFirefox?: Record<string, unknown>;
}): Promise<Browser>;

see https://github.com/puppeteer/puppeteer/blob/bba3f41286908ced8f03faf98242d4c3359a5efc/src/node/Puppeteer.ts#L146

However, the launchOptions of capture-website are of type LaunchOptions only:

readonly launchOptions?: LaunchOptions;

see https://github.com/sindresorhus/capture-website/blob/93947a5ed80fb9991119556e1bc8c7067d518bd7/index.d.ts#L342

Thus, for example, the configuration of args is not possible.