Closed NoamGaash closed 1 year ago
@Almenon
I believe I have found a way to support both the legacy callback-based API and the newer promise-based one. I believe my implementation has two main drawbacks:
Sorry for the delay, I do intend on getting to this eventually.
The problem with trying to support both approaches is that the typing doesn't work out. If you use .then typescript complains because the return value might not be a promise. There might be some fancy typescript syntax for solving this, but I'm just going to simplify and remove the callback option for the next major release. I'm presuming that's fine?
I'm going to merge this in, publish as v4 so you have your changes, and then make some changes I want to make w/ a v5 release.
that's my humble attempt to solve issue #77 thanks for making and maintaining this repo