Skip to content
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

fix(types): add generics for within queries #54

Merged
merged 4 commits into from
Dec 20, 2023

Conversation

KonnorRogers
Copy link
Owner

@KonnorRogers KonnorRogers commented Dec 20, 2023

For some reason RTL doesn't preserve generics, so we have to patch the within function to have proper type signatures.

Enables: within(...).getByShadowRole<HTMLButtonElement>("button")

Fixes #52

@KonnorRogers KonnorRogers merged commit f5a8bf6 into main Dec 20, 2023
3 checks passed
@KonnorRogers KonnorRogers deleted the konnorrogers/fix-generics-in-within-queries branch December 20, 2023 19:42
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.

Feature request: Generic types for query functions
1 participant