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

@@ -19,7 +19,7 @@ const {helper} = require('./helper');
class ExecutionContext {
/**
* @param {!Puppeteer.CDPSession} client
* @param {!Object} contextPayload
* @param {!Protocol.Runtime.ExecutionContextDescription} contextPayload
* @param {function(*):!JSHandle} objectHandleFactory
* @param {?Puppeteer.Frame} frame
*/
@@ -127,7 +127,7 @@ class JSHandle {
/**
* @param {!ExecutionContext} context
* @param {!Puppeteer.CDPSession} client
* @param {!Object} remoteObject
* @param {!Protocol.Runtime.RemoteObject} remoteObject
*/
constructor(context, client, remoteObject) {
this._context = context;