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

Typescript: can't use heading levels #61

Closed
Hypnosphi opened this issue Sep 2, 2021 · 1 comment · Fixed by #62
Closed

Typescript: can't use heading levels #61

Hypnosphi opened this issue Sep 2, 2021 · 1 comment · Fixed by #62
Labels
good first issue Good for newcomers

Comments

@Hypnosphi
Copy link
Contributor

Hypnosphi commented Sep 2, 2021

getByRole(document, 'heading', {level: 1})

gives following error:

TS2345: Argument of type '{ level: number; }' is not assignable to parameter of type 'RoleMatcherOptions'.   Object literal may only specify known properties, and 'level' does not exist in type 'RoleMatcherOptions'

You may want to reuse ByRoleOptions

@patrickhulce
Copy link
Collaborator

thanks @Hypnosphi! PR welcome if anyone would like to contribute :)

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

Successfully merging a pull request may close this issue.

2 participants