From 29a24385347b63ba29694be3fb8251bc08b00bf9 Mon Sep 17 00:00:00 2001 From: Joel Einbinder Date: Thu, 10 Jan 2019 22:56:39 -0800 Subject: [PATCH] chore(types): Upgrade TypeScript to 3.2.2 (#3754) --- lib/BrowserFetcher.js | 4 ++-- lib/FrameManager.js | 2 +- lib/Page.js | 12 ++++++------ lib/TaskQueue.js | 2 +- lib/Worker.js | 8 ++++---- lib/helper.js | 4 ++-- package.json | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/BrowserFetcher.js b/lib/BrowserFetcher.js index c5136a0e..4433df9f 100644 --- a/lib/BrowserFetcher.js +++ b/lib/BrowserFetcher.js @@ -125,7 +125,7 @@ class BrowserFetcher { /** * @param {string} revision - * @param {?function(number, number)} progressCallback + * @param {?function(number, number):void} progressCallback * @return {!Promise} */ async download(revision, progressCallback) { @@ -217,7 +217,7 @@ function parseFolderPath(folderPath) { /** * @param {string} url * @param {string} destinationPath - * @param {?function(number, number)} progressCallback + * @param {?function(number, number):void} progressCallback * @return {!Promise} */ function downloadFile(url, destinationPath, progressCallback) { diff --git a/lib/FrameManager.js b/lib/FrameManager.js index 26e5179f..d2e805f2 100644 --- a/lib/FrameManager.js +++ b/lib/FrameManager.js @@ -428,7 +428,7 @@ class Frame { } /** - * @param {function()|string} pageFunction + * @param {Function|string} pageFunction * @param {!Array<*>} args * @return {!Promise} */ diff --git a/lib/Page.js b/lib/Page.js index 01ceff67..62b9064d 100644 --- a/lib/Page.js +++ b/lib/Page.js @@ -292,7 +292,7 @@ class Page extends EventEmitter { } /** - * @param {function()|string} pageFunction + * @param {Function|string} pageFunction * @param {!Array<*>} args * @return {!Promise} */ @@ -312,7 +312,7 @@ class Page extends EventEmitter { /** * @param {string} selector - * @param {function()|string} pageFunction + * @param {Function|string} pageFunction * @param {!Array<*>} args * @return {!Promise<(!Object|undefined)>} */ @@ -412,7 +412,7 @@ class Page extends EventEmitter { /** * @param {string} name - * @param {function(?)} puppeteerFunction + * @param {Function} puppeteerFunction */ async exposeFunction(name, puppeteerFunction) { if (this._pageBindings.has(name)) @@ -782,7 +782,7 @@ class Page extends EventEmitter { } /** - * @param {function()|string} pageFunction + * @param {Function|string} pageFunction * @param {!Array<*>} args * @return {!Promise<*>} */ @@ -791,7 +791,7 @@ class Page extends EventEmitter { } /** - * @param {function()|string} pageFunction + * @param {Function|string} pageFunction * @param {!Array<*>} 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 {!Array<*>} args * @return {!Promise} diff --git a/lib/TaskQueue.js b/lib/TaskQueue.js index b3facc28..8cfb7a72 100644 --- a/lib/TaskQueue.js +++ b/lib/TaskQueue.js @@ -4,7 +4,7 @@ class TaskQueue { } /** - * @param {function()} task + * @param {Function} task * @return {!Promise} */ postTask(task) { diff --git a/lib/Worker.js b/lib/Worker.js index f3d8928d..5ac00617 100644 --- a/lib/Worker.js +++ b/lib/Worker.js @@ -21,8 +21,8 @@ class Worker extends EventEmitter { /** * @param {Puppeteer.CDPSession} client * @param {string} url - * @param {function(!string, !Array, Protocol.Runtime.StackTrace=)} consoleAPICalled - * @param {function(!Protocol.Runtime.ExceptionDetails)} exceptionThrown + * @param {function(string, !Array, Protocol.Runtime.StackTrace=):void} consoleAPICalled + * @param {function(!Protocol.Runtime.ExceptionDetails):void} exceptionThrown */ constructor(client, url, consoleAPICalled, exceptionThrown) { super(); @@ -58,7 +58,7 @@ class Worker extends EventEmitter { } /** - * @param {function()|string} pageFunction + * @param {Function|string} pageFunction * @param {!Array<*>} args * @return {!Promise<*>} */ @@ -67,7 +67,7 @@ class Worker extends EventEmitter { } /** - * @param {function()|string} pageFunction + * @param {Function|string} pageFunction * @param {!Array<*>} args * @return {!Promise} */ diff --git a/lib/helper.js b/lib/helper.js index 169a8218..cb8d1ff4 100644 --- a/lib/helper.js +++ b/lib/helper.js @@ -158,7 +158,7 @@ class Helper { /** * @param {!NodeJS.EventEmitter} emitter * @param {(string|symbol)} eventName - * @param {function(?)} handler + * @param {function(?):void} handler * @return {{emitter: !NodeJS.EventEmitter, eventName: (string|symbol), handler: function(?)}} */ 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) { for (const listener of listeners) diff --git a/package.json b/package.json index fa2906ad..322a64b1 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "pixelmatch": "^4.0.2", "pngjs": "^3.3.3", "text-diff": "^1.0.1", - "typescript": "3.1.6" + "typescript": "3.2.2" }, "browser": { "./lib/BrowserFetcher.js": false,