Skip to content

Commit 6344133

Browse files
authored
fix: Type definitions for findByRole() and findAllByRole() (#173)
1 parent f08d6ed commit 6344133

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

types/index.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import {
44
configure,
55
Matcher,
6+
ByRoleMatcher,
67
MatcherOptions as DTLMatcherOptions,
78
ByRoleOptions as DTLByRoleOptions,
89
SelectorMatcherOptions as DTLSelectorMatcherOptions,
@@ -211,7 +212,7 @@ declare global {
211212
* @see https://github.com/testing-library/cypress-testing-library#usage
212213
* @see https://github.com/testing-library/dom-testing-library#table-of-contents
213214
*/
214-
findByRole(id: Matcher, options?: ByRoleOptions): Chainable<JQuery>
215+
findByRole(id: ByRoleMatcher, options?: ByRoleOptions): Chainable<JQuery>
215216

216217
/**
217218
* dom-testing-library helpers for Cypress
@@ -222,7 +223,7 @@ declare global {
222223
* @see https://github.com/testing-library/cypress-testing-library#usage
223224
* @see https://github.com/testing-library/dom-testing-library#table-of-contents
224225
*/
225-
findAllByRole(id: Matcher, options?: ByRoleOptions): Chainable<JQuery>
226+
findAllByRole(id: ByRoleMatcher, options?: ByRoleOptions): Chainable<JQuery>
226227

227228
/**
228229
* dom-testing-library helpers for Cypress

0 commit comments

Comments
 (0)