fix(types): fix return types where JSDoc and api.md disagree (#3512)

This commit is contained in:
Joel Einbinder
2018-11-07 22:48:43 -08:00
committed by Andrey Lushnikov
parent 04b6ca85d0
commit 79ec7a3fe5
8 changed files with 29 additions and 28 deletions

View File

@@ -215,7 +215,7 @@ class JSHandle {
}
/**
* @return {!Promise<Map<string, !JSHandle>>}
* @return {!Promise<!Map<string, !JSHandle>>}
*/
async getProperties() {
const response = await this._client.send('Runtime.getProperties', {
@@ -404,12 +404,11 @@ class ElementHandle extends JSHandle {
/**
* @param {!Array<string>} filePaths
* @return {!Promise}
*/
async uploadFile(...filePaths) {
const files = filePaths.map(filePath => path.resolve(filePath));
const objectId = this._remoteObject.objectId;
return this._client.send('DOM.setFileInputFiles', { objectId, files });
await this._client.send('DOM.setFileInputFiles', { objectId, files });
}
async tap() {
@@ -481,7 +480,7 @@ class ElementHandle extends JSHandle {
/**
*
* @param {!Object=} options
* @returns {!Promise<Object>}
* @returns {!Promise<string|!Buffer>}
*/
async screenshot(options = {}) {
let needsViewportReset = false;