You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
I think the synchronous inspection API we have currently is clunky. My ideal one would look like promise.inspect() (or inspectState, or snapshot, or stateSnapshot, ...), which returns a "snapshot" object that is one of:
{ state = "pending" }
{ state = "fulfilled", value }
{ state = "rejected", reason }
The advantage of this over promise.state, promise.value, and promise.reason are:
In ES3, properties on the promise have to be mutable, which is confusing.
Even in ES5, if we were to make those getters, I think it's less-clear that they are a read-only API than a snapshot-returning function.