Sep 7, 2018 · 1 min read
What a lovely article. In one fell swoop, the entire approach, the intent and the workings become clear.
I am not too worried about the missing part — it is not an industrial strength implementation — it is meant to help us understand which it does so well.
Only thing which is not clear is — when I read the promises documentation, it said that callbacks passed to then method would get fired even if the processing of the action was already over. I could not figure out how that could be achieved. Perhaps in the then method, there is a check which checks the state of the Promise and calls the callback immediately?