Promise can be in one of the following three mutually exclusive states:
fulfilled: the operation completed successfully;
rejected: the operation did not complete successfully (typically due to an error);
pending: its future is still uncertain (i.e. it's neither
A promise is said to be "settled" if it is not
pending (i.e. if it is either
Being "settled" does not constitute to a state, but is rather meant as a hypernym for
Promise has two possible mutually exclusive fates:
A promise is considered resolved when:
- It has been either
- It has been "locked in" to follow another
Promise— i.e. it was resolved with another pending promise and will now be waiting on the eventual state of it.
A promise is considered to be unresolved, simply when it has not resolved. An unresolved promise is always in the
pending state, while a resolved promise may be
pending (when "locked in" for example),
This post was published by Daniyal Hamid. Daniyal currently works as the Head of Engineering in Germany and has 20+ years of experience in software engineering, design and marketing. Please show your love and support by sharing this post.