mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(types): fix return types where JSDoc and api.md disagree (#3512)
This commit is contained in:
committed by
Andrey Lushnikov
parent
04b6ca85d0
commit
79ec7a3fe5
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user