I'm far from certain about this, but I don't think the "equivalent" JS code for promise.tap was correct.
According to the description of the function, promise.tap should wait for doSideEffectsHere's return, and should reject if doSideEffectsHere() returns a rejected promise. Which the "equivalent" code didn't achieve. I think.
I'm far from certain about this, but I don't think the "equivalent" JS code for
promise.tap
was correct.According to the description of the function,
promise.tap
should wait fordoSideEffectsHere
's return, and should reject ifdoSideEffectsHere()
returns a rejected promise. Which the "equivalent" code didn't achieve. I think.