I want to know what is the difference between bindCallback and bindNodeCallback methods, in RxJs API; and how to know when use one or another.
Thanks alot!
The only difference is that Node callbacks always take an error as the first parameter. From the documentation for bindNodeCallback
:
The callback function is expected to follow Node.js conventions, where the first argument to the callback is an error, while remaining arguments are the callback result.
RxJS will take this into account and will wire up the callback's error
parameter to the observable's error notification mechanism. That's not possible with bindCallback
, as there is no convention for the parameters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With