puppeteer/src/node
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
..
BrowserFetcher.ts feat: support fetching and launching on Apple M1 2021-01-08 10:36:11 +01:00
BrowserRunner.ts chore(agnostification): agnostify web socket connections (#6520) 2020-10-19 10:32:41 +01:00
install.ts chore(agnostification): split up root Puppeteer class (#6504) 2020-10-13 16:19:26 +01:00
Launcher.ts fix: improve TS types for launching browsers (#6888) 2021-02-16 09:39:31 +00:00
LaunchOptions.ts fix: improve TS types for launching browsers (#6888) 2021-02-16 09:39:31 +00:00
NodeWebSocketTransport.ts chore(agnostification): agnostify web socket connections (#6520) 2020-10-19 10:32:41 +01:00
PipeTransport.ts chore: enforce file extensions on imports (#6202) 2020-07-13 10:22:26 +01:00
Puppeteer.ts fix: improve TS types for launching browsers (#6888) 2021-02-16 09:39:31 +00:00