mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
98c81458c2
This commit tidies up the quite confusing state of all the various types required to launch a browser. As we saw when upgrading DevTools (https://source.chromium.org/chromium/chromium/src/+/master:third_party/devtools-frontend/src/test/conductor/hooks.ts;l=77), we had to define our launch options variable like so: ```ts const opts: puppeteer.LaunchOptions & puppeteer.ChromeArgOptions & puppeteer.BrowserOptions = { ... }; ``` This commit fixes that by introducing `AllNodeLaunchOptions`, which is defined as the intersection of all the above types. Additionally, the types defined as `ChromeArgOptions` are actually used for launching both Chrome and Firefox, so I have renamed them to `BrowserArgOptions`, and therefore this change is breaking because anyone using `ChromeArgOptions` in their types will need to switch. BREAKING CHANGE: renamed type `ChromeArgOptions` to `BrowserLaunchArgumentOptions` BREAKING CHANGE: renamed type `BrowserOptions` to `BrowserConnectOptions` |
||
---|---|---|
.. | ||
common | ||
node | ||
.eslintrc.js | ||
api-docs-entry.ts | ||
environment.ts | ||
initialize-node.ts | ||
initialize-web.ts | ||
node-puppeteer-core.ts | ||
node.ts | ||
revisions.ts | ||
tsconfig.cjs.json | ||
tsconfig.esm.json | ||
web.ts |