chore(types): generate a d.ts file for protocol types (#2325)

This uses the `/json/protocol` endpoint to generate type definitions for the protocol.

Currently it is lacking protocol events and commands, but I will add those later.
This commit is contained in:
JoelEinbinder
2018-04-06 18:20:48 -07:00
committed by Andrey Lushnikov
parent 35e34db198
commit 8c54f41552
10 changed files with 72 additions and 13 deletions

View File

@@ -56,7 +56,7 @@ class Helper {
}
/**
* @param {!Object} exceptionDetails
* @param {!Protocol.Runtime.ExceptionDetails} exceptionDetails
* @return {string}
*/
static getExceptionMessage(exceptionDetails) {
@@ -74,7 +74,7 @@ class Helper {
}
/**
* @param {!Object} remoteObject
* @param {!Protocol.Runtime.RemoteObject} remoteObject
* @return {*}
*/
static valueFromRemoteObject(remoteObject) {
@@ -98,7 +98,7 @@ class Helper {
/**
* @param {!Puppeteer.CDPSession} client
* @param {!Object} remoteObject
* @param {!Protocol.Runtime.RemoteObject} remoteObject
*/
static async releaseObject(client, remoteObject) {
if (!remoteObject.objectId)