chore(types): Upgrade TypeScript to 3.2.2 (#3754)

This commit is contained in:
Joel Einbinder 2019-01-10 22:56:39 -08:00 committed by Andrey Lushnikov
parent c44564aa94
commit 29a2438534
7 changed files with 17 additions and 17 deletions

View File

@ -125,7 +125,7 @@ class BrowserFetcher {
/** /**
* @param {string} revision * @param {string} revision
* @param {?function(number, number)} progressCallback * @param {?function(number, number):void} progressCallback
* @return {!Promise<!BrowserFetcher.RevisionInfo>} * @return {!Promise<!BrowserFetcher.RevisionInfo>}
*/ */
async download(revision, progressCallback) { async download(revision, progressCallback) {
@ -217,7 +217,7 @@ function parseFolderPath(folderPath) {
/** /**
* @param {string} url * @param {string} url
* @param {string} destinationPath * @param {string} destinationPath
* @param {?function(number, number)} progressCallback * @param {?function(number, number):void} progressCallback
* @return {!Promise} * @return {!Promise}
*/ */
function downloadFile(url, destinationPath, progressCallback) { function downloadFile(url, destinationPath, progressCallback) {

View File

@ -428,7 +428,7 @@ class Frame {
} }
/** /**
* @param {function()|string} pageFunction * @param {Function|string} pageFunction
* @param {!Array<*>} args * @param {!Array<*>} args
* @return {!Promise<!Puppeteer.JSHandle>} * @return {!Promise<!Puppeteer.JSHandle>}
*/ */

View File

@ -292,7 +292,7 @@ class Page extends EventEmitter {
} }
/** /**
* @param {function()|string} pageFunction * @param {Function|string} pageFunction
* @param {!Array<*>} args * @param {!Array<*>} args
* @return {!Promise<!Puppeteer.JSHandle>} * @return {!Promise<!Puppeteer.JSHandle>}
*/ */
@ -312,7 +312,7 @@ class Page extends EventEmitter {
/** /**
* @param {string} selector * @param {string} selector
* @param {function()|string} pageFunction * @param {Function|string} pageFunction
* @param {!Array<*>} args * @param {!Array<*>} args
* @return {!Promise<(!Object|undefined)>} * @return {!Promise<(!Object|undefined)>}
*/ */
@ -412,7 +412,7 @@ class Page extends EventEmitter {
/** /**
* @param {string} name * @param {string} name
* @param {function(?)} puppeteerFunction * @param {Function} puppeteerFunction
*/ */
async exposeFunction(name, puppeteerFunction) { async exposeFunction(name, puppeteerFunction) {
if (this._pageBindings.has(name)) if (this._pageBindings.has(name))
@ -782,7 +782,7 @@ class Page extends EventEmitter {
} }
/** /**
* @param {function()|string} pageFunction * @param {Function|string} pageFunction
* @param {!Array<*>} args * @param {!Array<*>} args
* @return {!Promise<*>} * @return {!Promise<*>}
*/ */
@ -791,7 +791,7 @@ class Page extends EventEmitter {
} }
/** /**
* @param {function()|string} pageFunction * @param {Function|string} pageFunction
* @param {!Array<*>} args * @param {!Array<*>} args
*/ */
async evaluateOnNewDocument(pageFunction, ...args) { async evaluateOnNewDocument(pageFunction, ...args) {
@ -1054,7 +1054,7 @@ class Page extends EventEmitter {
} }
/** /**
* @param {function()} pageFunction * @param {Function} pageFunction
* @param {!{polling?: string|number, timeout?: number}=} options * @param {!{polling?: string|number, timeout?: number}=} options
* @param {!Array<*>} args * @param {!Array<*>} args
* @return {!Promise<!Puppeteer.JSHandle>} * @return {!Promise<!Puppeteer.JSHandle>}

View File

@ -4,7 +4,7 @@ class TaskQueue {
} }
/** /**
* @param {function()} task * @param {Function} task
* @return {!Promise} * @return {!Promise}
*/ */
postTask(task) { postTask(task) {

View File

@ -21,8 +21,8 @@ class Worker extends EventEmitter {
/** /**
* @param {Puppeteer.CDPSession} client * @param {Puppeteer.CDPSession} client
* @param {string} url * @param {string} url
* @param {function(!string, !Array<!JSHandle>, Protocol.Runtime.StackTrace=)} consoleAPICalled * @param {function(string, !Array<!JSHandle>, Protocol.Runtime.StackTrace=):void} consoleAPICalled
* @param {function(!Protocol.Runtime.ExceptionDetails)} exceptionThrown * @param {function(!Protocol.Runtime.ExceptionDetails):void} exceptionThrown
*/ */
constructor(client, url, consoleAPICalled, exceptionThrown) { constructor(client, url, consoleAPICalled, exceptionThrown) {
super(); super();
@ -58,7 +58,7 @@ class Worker extends EventEmitter {
} }
/** /**
* @param {function()|string} pageFunction * @param {Function|string} pageFunction
* @param {!Array<*>} args * @param {!Array<*>} args
* @return {!Promise<*>} * @return {!Promise<*>}
*/ */
@ -67,7 +67,7 @@ class Worker extends EventEmitter {
} }
/** /**
* @param {function()|string} pageFunction * @param {Function|string} pageFunction
* @param {!Array<*>} args * @param {!Array<*>} args
* @return {!Promise<!JSHandle>} * @return {!Promise<!JSHandle>}
*/ */

View File

@ -158,7 +158,7 @@ class Helper {
/** /**
* @param {!NodeJS.EventEmitter} emitter * @param {!NodeJS.EventEmitter} emitter
* @param {(string|symbol)} eventName * @param {(string|symbol)} eventName
* @param {function(?)} handler * @param {function(?):void} handler
* @return {{emitter: !NodeJS.EventEmitter, eventName: (string|symbol), handler: function(?)}} * @return {{emitter: !NodeJS.EventEmitter, eventName: (string|symbol), handler: function(?)}}
*/ */
static addEventListener(emitter, eventName, handler) { static addEventListener(emitter, eventName, handler) {
@ -167,7 +167,7 @@ class Helper {
} }
/** /**
* @param {!Array<{emitter: !NodeJS.EventEmitter, eventName: (string|symbol), handler: function(?)}>} listeners * @param {!Array<{emitter: !NodeJS.EventEmitter, eventName: (string|symbol), handler: function(?):void}>} listeners
*/ */
static removeEventListeners(listeners) { static removeEventListeners(listeners) {
for (const listener of listeners) for (const listener of listeners)

View File

@ -57,7 +57,7 @@
"pixelmatch": "^4.0.2", "pixelmatch": "^4.0.2",
"pngjs": "^3.3.3", "pngjs": "^3.3.3",
"text-diff": "^1.0.1", "text-diff": "^1.0.1",
"typescript": "3.1.6" "typescript": "3.2.2"
}, },
"browser": { "browser": {
"./lib/BrowserFetcher.js": false, "./lib/BrowserFetcher.js": false,