Skip to content

Commit ec672a6

Browse files
pbombKent C. Dodds
authored and
Kent C. Dodds
committed
fix: Make 2nd arg for getQueriesForElement optional and export within for TS types (#68)
1 parent e0200af commit ec672a6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type BoundFunctions<T> = {[P in keyof T]: BoundFunction<T[P]>}
1212

1313
export function getQueriesForElement(
1414
element: HTMLElement,
15-
queriesToBind:
15+
queriesToBind?:
1616
| BoundFunctions<typeof queries>
1717
| BoundFunctions<typeof queries>[],
1818
): BoundFunctions<typeof queries>

typings/index.d.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// TypeScript Version: 2.8
2+
import {getQueriesForElement} from './get-queries-for-element'
23
import * as queries from './queries'
34
import * as queryHelpers from './query-helpers'
45

5-
export {queries, queryHelpers}
6+
declare const within: typeof getQueriesForElement
7+
export {queries, queryHelpers, within}
68

79
export * from './queries'
810
export * from './query-helpers'

0 commit comments

Comments
 (0)