fix(types): fix parameters where they disagree with the api (#3525)

This commit is contained in:
Joel Einbinder
2018-11-12 12:59:21 -08:00
committed by Andrey Lushnikov
parent 27ea226bbc
commit 568734386d
10 changed files with 286 additions and 177 deletions

View File

@@ -71,7 +71,7 @@ class Launcher {
}
/**
* @param {!(LaunchOptions & ChromeArgOptions & BrowserOptions)=} options
* @param {!(Launcher.LaunchOptions & Launcher.ChromeArgOptions & Launcher.BrowserOptions)=} options
* @return {!Promise<!Browser>}
*/
async launch(options = {}) {
@@ -236,7 +236,7 @@ class Launcher {
}
/**
* @param {!ChromeArgOptions=} options
* @param {!Launcher.ChromeArgOptions=} options
* @return {!Array<string>}
*/
defaultArgs(options = {}) {
@@ -274,7 +274,7 @@ class Launcher {
}
/**
* @param {!(BrowserOptions & {browserWSEndpoint: string, transport?: !Puppeteer.ConnectionTransport})} options
* @param {!(Launcher.BrowserOptions & {browserWSEndpoint: string, transport?: !Puppeteer.ConnectionTransport})} options
* @return {!Promise<!Browser>}
*/
async connect(options) {
@@ -374,7 +374,7 @@ function waitForWSEndpoint(chromeProcess, timeout, preferredRevision) {
}
/**
* @typedef {Object} ChromeArgOptions
* @typedef {Object} Launcher.ChromeArgOptions
* @property {boolean=} headless
* @property {Array<string>=} args
* @property {string=} userDataDir
@@ -382,9 +382,9 @@ function waitForWSEndpoint(chromeProcess, timeout, preferredRevision) {
*/
/**
* @typedef {Object} LaunchOptions
* @typedef {Object} Launcher.LaunchOptions
* @property {string=} executablePath
* @property {boolean=} ignoreDefaultArgs
* @property {boolean|Array<string>=} ignoreDefaultArgs
* @property {boolean=} handleSIGINT
* @property {boolean=} handleSIGTERM
* @property {boolean=} handleSIGHUP
@@ -395,7 +395,7 @@ function waitForWSEndpoint(chromeProcess, timeout, preferredRevision) {
*/
/**
* @typedef {Object} BrowserOptions
* @typedef {Object} Launcher.BrowserOptions
* @property {boolean=} ignoreHTTPSErrors
* @property {(?Puppeteer.Viewport)=} defaultViewport
* @property {number=} slowMo