Skip to content

Commit 3da4c4a

Browse files
committed
chore: flow typing
1 parent 6779e66 commit 3da4c4a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

typings/index.flow.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,37 @@ interface A11yAPI {
389389
) => FindAllReturn;
390390
}
391391

392+
type ByPredicateOptions = CommonQueryOptions;
393+
394+
interface ByPredicateQueries {
395+
getByPredicate: (
396+
placeholder: TextMatch,
397+
options?: ByPredicateOptions
398+
) => ReactTestInstance;
399+
getAllByPredicate: (
400+
placeholder: TextMatch,
401+
options?: ByPredicateOptions
402+
) => Array<ReactTestInstance>;
403+
queryByPredicate: (
404+
placeholder: TextMatch,
405+
options?: ByPredicateOptions
406+
) => ReactTestInstance | null;
407+
queryAllByPredicate: (
408+
placeholder: TextMatch,
409+
options?: ByPredicateOptions
410+
) => Array<ReactTestInstance> | [];
411+
findByPredicate: (
412+
placeholder: TextMatch,
413+
queryOptions?: ByPredicateOptions,
414+
waitForOptions?: WaitForOptions
415+
) => FindReturn;
416+
findAllByPredicate: (
417+
placeholder: TextMatch,
418+
queryOptions?: ByPredicateOptions,
419+
waitForOptions?: WaitForOptions
420+
) => FindAllReturn;
421+
}
422+
392423
interface Thenable {
393424
then: (resolve: () => any, reject?: () => any) => any;
394425
}
@@ -412,6 +443,7 @@ type Queries = ByTextQueries &
412443
ByTestIdQueries &
413444
ByDisplayValueQueries &
414445
ByPlaceholderTextQueries &
446+
ByPredicateQueries &
415447
UnsafeByTypeQueries &
416448
UnsafeByPropsQueries &
417449
A11yAPI;

0 commit comments

Comments
 (0)