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

Support AbortSignal to debounce & delay for improved cancellation #37

Closed
jchoi-prestolabs opened this issue Jun 13, 2024 · 4 comments
Closed

Comments

@jchoi-prestolabs
Copy link

The debounce function already supports cancellation through its return value, but its usability would improve if it also supported cancellation via AbortSignal, which is implemented in all major web browsers and JavaScript runtimes.

It would also be great to add a cancel feature to the delay function, and using AbortSignal here as well would be a good idea.

@Hanna922
Copy link
Contributor

If you don't have any plans to work on this, may I take it on? Thank you.

@jchoi-prestolabs
Copy link
Author

Sure, I have no plan to work for this now.

@raon0211
Copy link
Collaborator

It would help if we could make delay throw new Error('The operation was aborted') if it is aborted :) (Like in undici of Node.js)

@raon0211
Copy link
Collaborator

This issue was resolved by #45 and #52. Thanks for your contribution, @Hanna922 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants