Skip to content

Commit d4cbb45

Browse files
ShaswatPrabhatmdjastrzebski
authored andcommitted
Update flow types for the label and hint queries
1 parent ef0ca15 commit d4cbb45

File tree

1 file changed

+54
-12
lines changed

1 file changed

+54
-12
lines changed

typings/index.flow.js

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,26 @@ type ByRoleOptions = {
210210

211211
interface A11yAPI {
212212
// Label
213-
getByLabelText: (matcher: TextMatch) => GetReturn;
214-
getAllByLabelText: (matcher: TextMatch) => GetAllReturn;
215-
queryByLabelText: (matcher: TextMatch) => QueryReturn;
216-
queryAllByLabelText: (matcher: TextMatch) => QueryAllReturn;
213+
getByLabelText: (
214+
matcher: TextMatch,
215+
queryOptions?: TextMatchOptions
216+
) => GetReturn;
217+
getAllByLabelText: (
218+
matcher: TextMatch,
219+
queryOptions?: TextMatchOptions
220+
) => GetAllReturn;
221+
queryByLabelText: (
222+
matcher: TextMatch,
223+
queryOptions?: TextMatchOptions
224+
) => QueryReturn;
225+
queryAllByLabelText: (
226+
matcher: TextMatch,
227+
queryOptions?: TextMatchOptions
228+
) => QueryAllReturn;
217229
findByLabelText: (
218230
matcher: TextMatch,
231+
queryOptions?: TextMatchOptions,
232+
219233
waitForOptions?: WaitForOptions
220234
) => FindReturn;
221235
findAllByLabelText: (
@@ -224,28 +238,56 @@ interface A11yAPI {
224238
) => FindAllReturn;
225239

226240
// Hint
227-
getByA11yHint: (matcher: TextMatch) => GetReturn;
228-
getByHintText: (matcher: TextMatch) => GetReturn;
229-
getAllByA11yHint: (matcher: TextMatch) => GetAllReturn;
230-
getAllByHintText: (matcher: TextMatch) => GetAllReturn;
231-
queryByA11yHint: (matcher: TextMatch) => QueryReturn;
232-
queryByHintText: (matcher: TextMatch) => QueryReturn;
233-
queryAllByA11yHint: (matcher: TextMatch) => QueryAllReturn;
234-
queryAllByHintText: (matcher: TextMatch) => QueryAllReturn;
241+
getByA11yHint: (
242+
matcher: TextMatch,
243+
queryOptions?: TextMatchOptions
244+
) => GetReturn;
245+
getByHintText: (
246+
matcher: TextMatch,
247+
queryOptions?: TextMatchOptions
248+
) => GetReturn;
249+
getAllByA11yHint: (
250+
matcher: TextMatch,
251+
queryOptions?: TextMatchOptions
252+
) => GetAllReturn;
253+
getAllByHintText: (
254+
matcher: TextMatch,
255+
queryOptions?: TextMatchOptions
256+
) => GetAllReturn;
257+
queryByA11yHint: (
258+
matcher: TextMatch,
259+
queryOptions?: TextMatchOptions
260+
) => QueryReturn;
261+
queryByHintText: (
262+
matcher: TextMatch,
263+
queryOptions?: TextMatchOptions
264+
) => QueryReturn;
265+
queryAllByA11yHint: (
266+
matcher: TextMatch,
267+
queryOptions?: TextMatchOptions
268+
) => QueryAllReturn;
269+
queryAllByHintText: (
270+
matcher: TextMatch,
271+
queryOptions?: TextMatchOptions
272+
) => QueryAllReturn;
235273
findByA11yHint: (
236274
matcher: TextMatch,
275+
queryOptions?: TextMatchOptions,
237276
waitForOptions?: WaitForOptions
238277
) => FindReturn;
239278
findByHintText: (
240279
matcher: TextMatch,
280+
queryOptions?: TextMatchOptions,
241281
waitForOptions?: WaitForOptions
242282
) => FindReturn;
243283
findAllByA11yHint: (
244284
matcher: TextMatch,
285+
queryOptions?: TextMatchOptions,
245286
waitForOptions?: WaitForOptions
246287
) => FindAllReturn;
247288
findAllByHintText: (
248289
matcher: TextMatch,
290+
queryOptions?: TextMatchOptions,
249291
waitForOptions?: WaitForOptions
250292
) => FindAllReturn;
251293

0 commit comments

Comments
 (0)