Skip to content

Add conditional return type for Clients.matchAll #928

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

Merged
merged 3 commits into from
Dec 11, 2020

Conversation

Manduro
Copy link
Contributor

@Manduro Manduro commented Oct 5, 2020

When specifically querying for clients of type window, return the specific WindowClient type instead of the generic Client type.

@Manduro Manduro requested a review from sandersn as a code owner October 5, 2020 20:03
@ghost
Copy link

ghost commented Oct 5, 2020

CLA assistant check
All CLA requirements met.

@Manduro Manduro force-pushed the clients-match-all branch from 4f0e0f0 to c661c23 Compare October 5, 2020 20:06
When specifically querying for clients of type window, return the specific WindowClient type.
@Manduro Manduro force-pushed the clients-match-all branch from c661c23 to 5d63f61 Compare October 5, 2020 20:17
Use narrower `extends` test in conditional type.
Add missed source JSON update
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a decent change. I don't like overloads or conditional types much, but conditional types are the better of the two.

@sandersn sandersn merged commit 7345e8d into microsoft:master Dec 11, 2020
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 this pull request may close these issues.

3 participants