Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

basi1iscus
Copy link

  • tests and linter show no problems (npm t)
  • tests are added/updated for bug fixes and new features
  • code is properly formatted (npm run fmt)
  • description of changes is added in CHANGELOG.md
  • update .d.ts typings

lib/collector.js Outdated
this.keys = keys;
this.isRejectable = isRejectable;
Copy link
Contributor

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

Copy link
Author

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) {
Copy link
Contributor

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.

Copy link
Author

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".

@tshemsedinov
Copy link
Member

I do not remember the purpose of all this stuff, please send me link to video and more explanations in private messages @basi1iscus Thanks!

@tshemsedinov
Copy link
Member

Also need to rebase on master

@tshemsedinov tshemsedinov changed the title add allSettled mode for Collector class WIP: Add allSettled mode for Collector class Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants