Typings for findBy*
do not include waitForElement
options
#366
Labels
help wanted
Extra attention is needed
TypeScript
Related to TypeScript. Note: only certain maintainers handle TypeScript labeled issues.
react-testing-library
version: 7.0.0react
version: 16.8.4node
version: 8.12.0npm
(oryarn
) version: 6.9.0Relevant code or config:
What you did:
Per the docs, the findBy queries accept the
waitForElement
options as the last argument. The TypeScript configuration only reflects a possible 1-2 arguments instead of the expected 1-3.I suspect this has to do with how
RenderResult
(react-testing-library/typings/index.d.ts
Lines 19 to 34 in 960451b
& {[P in keyof Q]: BoundFunction<Q[P]>
) withqueries
viaBoundFunction
(https://github.com/testing-library/dom-testing-library/blob/4fb00936cbf5b0d715f5b54d16576dc3bfe20460/typings/get-queries-for-element.d.ts#L4-L14).I'd love to help; I'm hazy on how exactly the following works; which is where I believe the problem lies:
https://github.com/testing-library/dom-testing-library/blob/4fb00936cbf5b0d715f5b54d16576dc3bfe20460/typings/get-queries-for-element.d.ts#L4-L14
The text was updated successfully, but these errors were encountered: