chore(types): Upgrade TypeScript to 3.2.2 (#3754)
This commit is contained in:
parent
c44564aa94
commit
29a2438534
@ -125,7 +125,7 @@ class BrowserFetcher {
|
||||
|
||||
/**
|
||||
* @param {string} revision
|
||||
* @param {?function(number, number)} progressCallback
|
||||
* @param {?function(number, number):void} progressCallback
|
||||
* @return {!Promise<!BrowserFetcher.RevisionInfo>}
|
||||
*/
|
||||
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) {
|
||||
|
@ -428,7 +428,7 @@ class Frame {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {function()|string} pageFunction
|
||||
* @param {Function|string} pageFunction
|
||||
* @param {!Array<*>} args
|
||||
* @return {!Promise<!Puppeteer.JSHandle>}
|
||||
*/
|
||||
|
12
lib/Page.js
12
lib/Page.js
@ -292,7 +292,7 @@ class Page extends EventEmitter {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {function()|string} pageFunction
|
||||
* @param {Function|string} pageFunction
|
||||
* @param {!Array<*>} args
|
||||
* @return {!Promise<!Puppeteer.JSHandle>}
|
||||
*/
|
||||
@ -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<!Puppeteer.JSHandle>}
|
||||
|
@ -4,7 +4,7 @@ class TaskQueue {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {function()} task
|
||||
* @param {Function} task
|
||||
* @return {!Promise}
|
||||
*/
|
||||
postTask(task) {
|
||||
|
@ -21,8 +21,8 @@ class Worker extends EventEmitter {
|
||||
/**
|
||||
* @param {Puppeteer.CDPSession} client
|
||||
* @param {string} url
|
||||
* @param {function(!string, !Array<!JSHandle>, Protocol.Runtime.StackTrace=)} consoleAPICalled
|
||||
* @param {function(!Protocol.Runtime.ExceptionDetails)} exceptionThrown
|
||||
* @param {function(string, !Array<!JSHandle>, 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<!JSHandle>}
|
||||
*/
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user