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

[BUG] Page is missing type declaration for removeListener #2296

Closed
zaynetro opened this issue May 19, 2020 · 0 comments · Fixed by #2307
Closed

[BUG] Page is missing type declaration for removeListener #2296

zaynetro opened this issue May 19, 2020 · 0 comments · Fixed by #2307
Assignees

Comments

@zaynetro
Copy link

Context:

  • Playwright Version: 1.0.2
  • Operating System: Linux
  • Node version: 10.20.1
  • Browser: N/A

Code Snippet

npm init
npm i --save playwright-core
grep -n removeListener node_modules/playwright-core/types/types.d.ts 

61: * The Page class emits various events (described below) which can be handled using any of Node's native `EventEmitter` methods, such as `on`, `once` or `removeListener`.
66: * To unsubscribe from events use the `removeListener` method:
73: * page.removeListener('request', logRequest);
2401:  removeListener: <T extends keyof Protocol.Events | symbol>(event: T, listener: (payload: T extends symbol ? any : Protocol.Events[T extends keyof Protocol.Events ? T : never]) => void) => this;

Describe the bug

Page interface is missing declarations for removeListener methods.

The only removeListener declaration is on CDPSession interface. Other entries are part of a comment.

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

Successfully merging a pull request may close this issue.

2 participants