Skip to content

Fix typings for double-bound functions #139

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 2 commits into from
Oct 25, 2018

Conversation

jgoz
Copy link
Contributor

@jgoz jgoz commented Oct 25, 2018

What:

Typings were wrong for queryByTestId and other double-bound query functions.

Fixes #135.

Why:

Some helper functions have 4 arguments (QueryByAttribute, AllByAttribute) because they are bound once for the attribute, and then again for the container.

How:

Added a 4-argument case to the conditional type in BoundFunction.

Checklist:

  • Documentation N/A
  • Tests N/A
  • Ready to be merged
  • Added myself to contributors table

Tested in my personal repositories and the typing errors disappeared.

@kentcdodds kentcdodds merged commit 933aab4 into testing-library:master Oct 25, 2018
@jgoz jgoz deleted the fix-typings branch October 26, 2018 01:54
@kentcdodds
Copy link
Member

🎉 This PR is included in version 3.12.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Types for queryByTestId not correct
2 participants