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

[Feature] Overload waitForEvent to return specific type #1674

Closed
kalekseev opened this issue Apr 6, 2020 · 2 comments · Fixed by #1715
Closed

[Feature] Overload waitForEvent to return specific type #1674

kalekseev opened this issue Apr 6, 2020 · 2 comments · Fixed by #1715

Comments

@kalekseev
Copy link

Right now waitForEvent return type is Object, but we can have specific types with overload:

waitForEvent(event: "popup", optionsOrPredicate?: Function|PageWaitForEventOptionsOrPredicate): Promise<Page>;
...
waitForEvent(event: string, optionsOrPredicate?: Function|PageWaitForEventOptionsOrPredicate): Promise<Object>;
@pavelfeldman
Copy link
Member

I thought we already had it. I can see specializations in my working folder types/types.d.ts, but not in the playwright-core@next. @JoelEinbinder do you know what is going on here?

@JoelEinbinder
Copy link
Contributor

I misspoke, the PR seems to have gotten lost in the mail. Thanks for catching this!

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.

3 participants