Skip to content

Commit

Permalink
chore(types): Upgrade TypeScript to 3.2.2 (#3754)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelEinbinder authored and aslushnikov committed Jan 11, 2019
1 parent c44564a commit 29a2438
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions lib/BrowserFetcher.js
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/FrameManager.js
Expand Up @@ -428,7 +428,7 @@ class Frame {
}

/**
* @param {function()|string} pageFunction
* @param {Function|string} pageFunction
* @param {!Array<*>} args
* @return {!Promise<!Puppeteer.JSHandle>}
*/
Expand Down
12 changes: 6 additions & 6 deletions lib/Page.js
Expand Up @@ -292,7 +292,7 @@ class Page extends EventEmitter {
}

/**
* @param {function()|string} pageFunction
* @param {Function|string} pageFunction
* @param {!Array<*>} args
* @return {!Promise<!Puppeteer.JSHandle>}
*/
Expand All @@ -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)>}
*/
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -782,7 +782,7 @@ class Page extends EventEmitter {
}

/**
* @param {function()|string} pageFunction
* @param {Function|string} pageFunction
* @param {!Array<*>} args
* @return {!Promise<*>}
*/
Expand All @@ -791,7 +791,7 @@ class Page extends EventEmitter {
}

/**
* @param {function()|string} pageFunction
* @param {Function|string} pageFunction
* @param {!Array<*>} args
*/
async evaluateOnNewDocument(pageFunction, ...args) {
Expand Down Expand Up @@ -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>}
Expand Down
2 changes: 1 addition & 1 deletion lib/TaskQueue.js
Expand Up @@ -4,7 +4,7 @@ class TaskQueue {
}

/**
* @param {function()} task
* @param {Function} task
* @return {!Promise}
*/
postTask(task) {
Expand Down
8 changes: 4 additions & 4 deletions lib/Worker.js
Expand Up @@ -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();
Expand Down Expand Up @@ -58,7 +58,7 @@ class Worker extends EventEmitter {
}

/**
* @param {function()|string} pageFunction
* @param {Function|string} pageFunction
* @param {!Array<*>} args
* @return {!Promise<*>}
*/
Expand All @@ -67,7 +67,7 @@ class Worker extends EventEmitter {
}

/**
* @param {function()|string} pageFunction
* @param {Function|string} pageFunction
* @param {!Array<*>} args
* @return {!Promise<!JSHandle>}
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/helper.js
Expand Up @@ -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) {
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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,
Expand Down

1 comment on commit 29a2438

@SimonSchick
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason you aren't using TS for the whole project at this point?

Please sign in to comment.