Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve signature of waitFor utility function #3825

Closed
amcclain opened this issue Nov 14, 2024 · 0 comments · Fixed by #3826
Closed

Improve signature of waitFor utility function #3825

amcclain opened this issue Nov 14, 2024 · 0 comments · Fixed by #3826

Comments

@amcclain
Copy link
Member

Currently waitFor(condition: () => boolean, interval: number = 50, timeout: number = 5 * SECONDS) which is a bit unfortunate, as it's much more likely that a dev will want to customize the timeout vs. the interval.

Would be great if we took the latter two in an options object. I think it would be reasonable to do this as a breaking change, since TS should alert developers and I doubt there are all that many usages in the wild.

@amcclain amcclain self-assigned this Nov 14, 2024
amcclain added a commit that referenced this issue Nov 14, 2024
+ Take optional `interval` and `timeout` arguments in a single options object - allow for easier (common) customization of timeout without needing to think about interval.
+ Fixes #3825
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant