puppeteer/src
Jack Franklin 98c81458c2
fix: improve TS types for launching browsers (#6888)
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`
2021-02-16 09:39:31 +00:00
..
common fix: improve TS types for launching browsers (#6888) 2021-02-16 09:39:31 +00:00
node fix: improve TS types for launching browsers (#6888) 2021-02-16 09:39:31 +00:00
.eslintrc.js chore: update eslint & eslint plugins (#6487) 2020-10-12 10:30:35 +01:00
api-docs-entry.ts fix: improve TS types for launching browsers (#6888) 2021-02-16 09:39:31 +00:00
environment.ts chore: shorter node checker function (#6584) 2020-11-05 07:49:58 +01:00
initialize-node.ts chore(agnostification): split up root Puppeteer class (#6504) 2020-10-13 16:19:26 +01:00
initialize-web.ts chore(agnostification): split up root Puppeteer class (#6504) 2020-10-13 16:19:26 +01:00
node-puppeteer-core.ts chore(agnostification): split up root Puppeteer class (#6504) 2020-10-13 16:19:26 +01:00
node.ts chore(agnostification): split up root Puppeteer class (#6504) 2020-10-13 16:19:26 +01:00
revisions.ts feat(chromium): roll Chromium to r848005 (#6801) 2021-02-02 17:24:10 +01:00
tsconfig.cjs.json chore: vendor Mitt & update project structure (#6209) 2020-07-14 16:57:29 +01:00
tsconfig.esm.json feat(types): expose typedefs to consumers (#6745) 2021-01-13 10:37:35 +01:00
web.ts chore(agnostification): split up root Puppeteer class (#6504) 2020-10-13 16:19:26 +01:00