Skip to content

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