Skip to content

Make event functions accept Element #150

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 1 commit into from
Nov 7, 2018

Conversation

Alxandr
Copy link
Contributor

@Alxandr Alxandr commented Nov 7, 2018

What: Update typescript types to allow for Element (instead of HTMLElement) to be used in event functions.

Why: Browser APIs such as querySelector returns Element, not HTMLElement. This requires an explicit cast to use the event functions from dom-testing-library.

How: Updated typescript definitions.

Checklist:

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

Resolves #149

@kentcdodds kentcdodds merged commit f427ec3 into testing-library:master Nov 7, 2018
@kentcdodds
Copy link
Member

🎉 This PR is included in version 3.12.2 🎉

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.

Typings for event functions requires HTMLElement, but querySelector (et. al) returns Element
3 participants