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

Add type checking to CDPSession.send #2758

Closed
FiloSottile opened this issue Jun 17, 2018 · 3 comments
Closed

Add type checking to CDPSession.send #2758

FiloSottile opened this issue Jun 17, 2018 · 3 comments

Comments

@FiloSottile
Copy link

devtools-protocol provides type definitions for the remote protocol commands.

GoogleChrome/lighthouse#4914 added support for type checking in their equivalent of CDPSession.send. It would be very useful to have the same for CDPSession.send.

@JoelEinbinder
Copy link
Collaborator

We have type checking for CDPSession.send in Puppeteer! Check out https://github.com/GoogleChrome/puppeteer/blob/master/utils/protocol-types-generator/index.js.

We don't maintain the @types/puppeteer project, but you can find them here: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/puppeteer.

@FiloSottile
Copy link
Author

Hmm, interesting. I don't see them applied in VSCode with @types/puppeteer 1.3.4.

image

Should I move this to DefinitelyTyped?

@aslushnikov
Copy link
Contributor

@FiloSottile looks like DefinitelyTyped just lacking some types; whoever wants to contribute them there, feel free to generate type descriptions using our generator that Joel referred to.

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

3 participants