types: error in the baseElement typings #1004
Labels
bug
Something isn't working
TypeScript
Related to TypeScript. Note: only certain maintainers handle TypeScript labeled issues.
@testing-library/react
version: 12.1.2Relevant code or config:
What you did:
I test the modal component. When a modal has appeared, it should block the body and prevent the user's scroll behavior.
What happened:
After upgrading to @testing-library/react up to 12.1.2 from 11.1.0, I noticed that typing for the baseElement was changed in the 11.12.5.
And I received such error:
Property 'style' does not exist on type 'Element'.
Reproduction:
Try to get some HTML attributes from the baseElement
Problem description:
Previously render returned baseElement as HTMLElement, but now it returns it as Element.
Suggested solution:
Provide examples in the documentation or make flexible types
The text was updated successfully, but these errors were encountered: