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
Add initial delay support + Version bump #21
Conversation
Is there a chance you can have a look ? I'm still using the insecure wrapper from the issue I created in my project and I would love to not have an "insecure" wrapper when my app will be ready for production |
@ealmansi Still waiting to get an answer, it has been over a month. Any chance to get feedback? |
@ealmansi Any update? :) |
Hi @jamesst20 , thanks for your contribution and apologies for the slow reply. I'm closing the PR because the proposed solution is IMHO not good API design. As a user of this library, it would be entirely unintuitive to me why I would use an array instead of a number for the interval argument, and what the expected behavior of doing so would be. It feels like a hack. There's a couple of additional issues with the PR:
|
If you have a better idea in mind I am open. Also, the usage of an array was optional which I think kind of invalidate a bit the "unintuitive" part. |
Would love to see this PR merged |
Give the ability tot have a custom initial delay. It can be useful in a lot of cases and it would allow us to also run immediately an interval instead of waiting the interval in the first place.
I ensured there would not be any breaking changes or signature changes.
How to use
What's next:
TypeScript signature will need to permit the array. In the mean time it is not breaking anything because the original signature is 100% compatible.
https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/set-interval-async