Skip to content

Commit 8b3f767

Browse files
msimulcikKent C. Dodds
authored and
Kent C. Dodds
committed
fix(TS): fix typings of getQueriesForElement (#246)
1 parent caffc56 commit 8b3f767

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

typings/get-queries-for-element.d.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ export type BoundFunction<T> = T extends (
1313
: never
1414
export type BoundFunctions<T> = {[P in keyof T]: BoundFunction<T[P]>}
1515

16-
export function getQueriesForElement(
16+
export function getQueriesForElement<T = typeof queries>(
1717
element: HTMLElement,
18-
queriesToBind?:
19-
| BoundFunctions<typeof queries>
20-
| BoundFunctions<typeof queries>[],
21-
): BoundFunctions<typeof queries>
18+
queriesToBind?: T,
19+
): BoundFunctions<T>

0 commit comments

Comments
 (0)