Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide helper or instructions for using type definitions #106

Open
FiloSottile opened this issue Jun 17, 2018 · 1 comment
Open

Provide helper or instructions for using type definitions #106

FiloSottile opened this issue Jun 17, 2018 · 1 comment

Comments

@FiloSottile
Copy link

I was glad to find type definitions for the protocol, but I don't see a way to use them with puppeteer's CDPSession.send.

Unless I'm missing something (which is entirely possible), it would be nice to have a simple helper that takes a (method: string, params?: object | undefined): Promise<any> function (as implemented by various libraries) and returns a type-checked wrapper.

See also puppeteer/puppeteer#2758

@paulirish
Copy link
Member

cc @brendankenny who did our implementation in lighthouse, though it's spread across a few files (connection.js, driver.js, protocol.d.ts)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants