-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
promise.inspect() #256
Comments
It’s a good argument. |
Optionally, Also, we'd of course keep the rather-convenient |
Ah, and I forgot to mention: Node.js's |
I think the synchronous inspection API we have currently is clunky. My ideal one would look like
promise.inspect()
(orinspectState
, orsnapshot
, orstateSnapshot
, ...), 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
, andpromise.reason
are:Q.allSettled
(see Q.allSettled #257).The text was updated successfully, but these errors were encountered: