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

feat(watchOnce): allow watching until certain condition is met #3946

Closed
wants to merge 1 commit into from

Conversation

BR0kEN-
Copy link

@BR0kEN- BR0kEN- commented May 2, 2024

Description

Add the optional until callback to the watchOnce options to keep watching until certain condition is met.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 2, 2024
@antfu
Copy link
Member

antfu commented May 27, 2024

I am not sure about this, having this would change the semantic of watchOnce - that might end up the handler being called multiple times. I guess it might be better for you to just call the stop handler returned by watch when you no longer need it.

Thank you

@antfu antfu closed this May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants