3 ms·
The reason the run() method exists is to avoid how normal promises automatically run on the next event loop tick after then() is called. It allows more flexibil
by cleod9 11y ago
The reason the run() method exists is to avoid how normal promises automatically run on the next event loop tick after then() is called. It allows more flexibility by separating the definition of a "promise" chain from the actual execution of the chain. Also I consciously excluded automatic error handling, since I personally disagree with how promises consume errors that are unmanaged (can be a debugging nightmare!). I prefer the opposite, where errors are managed by the developer and not the library.
I totally appreciate the feedback though, I don't think this can replace promises but it might be useful for people who want an alternative.