-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
WIP: Add allSettled mode for Collector class #233
Conversation
lib/collector.js
Outdated
this.keys = keys; | ||
this.isRejectable = isRejectable; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should check if isRejectable
is boolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -88,6 +106,13 @@ class Collector { | |||
} | |||
} | |||
|
|||
function getSettled(err = null, value = null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't be a separate function, it should be inside a class Collector
. And what must do this function? Function set
takes the argument value
not as an object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made getSettled as static method in class Collector before, but @tshemsedinov said said that the function is better.
Function should return an object like Promise.allSettled() depending on whether the result is "fulfilled" or "rejected".
I do not remember the purpose of all this stuff, please send me link to video and more explanations in private messages @basi1iscus Thanks! |
Also need to rebase on master |
npm t
)npm run fmt
)