We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b3f767 commit 02865f1Copy full SHA for 02865f1
typings/get-queries-for-element.d.ts
@@ -13,7 +13,21 @@ export type BoundFunction<T> = T extends (
13
: never
14
export type BoundFunctions<T> = {[P in keyof T]: BoundFunction<T[P]>}
15
16
-export function getQueriesForElement<T = typeof queries>(
+interface Query extends Function {
17
+ (container: HTMLElement, ...args: any[]):
18
+ | Error
19
+ | Promise<HTMLElement[]>
20
+ | Promise<HTMLElement>
21
+ | HTMLElement[]
22
+ | HTMLElement
23
+ | null
24
+}
25
+
26
+interface Queries {
27
+ [T: string]: Query
28
29
30
+export function getQueriesForElement<T extends Queries = typeof queries>(
31
element: HTMLElement,
32
queriesToBind?: T,
33
): BoundFunctions<T>
0 commit comments