Closed pimterry closed 4 years ago
Good spot, thanks for the PR. It looks like we can't proxy off
because that didn't exist until node v10, which is why the tests are failing. Could you update the PR to remove that one? Happy to get this merged when it's passing.
I think it's correct that the event bindings are not promised based. I think callbacks are always the appropriate interface for these.
Thanks! Published as 2.1.7
.
Great stuff, thanks!
The docs say:
That's not quite true, because this doesn't work:
This PR fixes that in the simplest way, by just exposing all the interesting event emitter methods from GPIO on the promise object, bound back to GPIO.
These methods don't actually use promises of course, but being able to use
.promise
as a drop-in replacement is super useful imo, and from the docs above it seems like that's what you're aiming for.