Skip to content

Commit 95fb415

Browse files
committed
fix: ts error
1 parent 4520f7a commit 95fb415

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/queries/role.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const queryAllByRole: AllByRole = (
159159
return matcher(firstWord, node, role as Matcher, matchNormalizer)
160160
}
161161

162-
const implicitRoles = getImplicitAriaRoles(node)
162+
const implicitRoles = getImplicitAriaRoles(node) as string[]
163163

164164
return implicitRoles.some(implicitRole =>
165165
matcher(implicitRole, node, role as Matcher, matchNormalizer),

src/query-helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,11 @@ function buildQueries(
243243
)
244244

245245
const findAllBy = makeFindQuery(
246-
// @ts-expect-error
246+
// @ts-expect-error: ByRoleMatcher and ByRoleOptions are not compatible with Matcher and MatcherOptions respectible
247247
wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name, 'findAll'),
248248
)
249249
const findBy = makeFindQuery(
250-
// @ts-expect-error
250+
// @ts-expect-error: ByRoleMatcher and ByRoleOptions are not compatible with Matcher and MatcherOptions respectible
251251
wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, 'find'),
252252
)
253253

0 commit comments

Comments
 (0)