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

feat(async/unstable): accept iterator varargs in MuxAsyncIterator #6087

Conversation

scarf005
Copy link
Contributor

@scarf005 scarf005 commented Oct 3, 2024

@scarf005 scarf005 requested a review from kt3k as a code owner October 3, 2024 09:24
@github-actions github-actions bot added the async label Oct 3, 2024
Copy link

codecov bot commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.77%. Comparing base (a6a9b86) to head (9ab022a).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6087      +/-   ##
==========================================
+ Coverage   96.75%   96.77%   +0.02%     
==========================================
  Files         510      513       +3     
  Lines       39189    39250      +61     
  Branches     5799     5815      +16     
==========================================
+ Hits        37919    37986      +67     
+ Misses       1228     1222       -6     
  Partials       42       42              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@scarf005 scarf005 force-pushed the feat/6086/stdasync-make-`MuxAsyncIterator`-accept-varargs branch 3 times, most recently from 6feb809 to 0bdd293 Compare October 5, 2024 02:25
@kt3k
Copy link
Member

kt3k commented Oct 7, 2024

Thanks for the PR.

not sure how to handle unstable as it needs to modify class constructor.

I think we can extend the class and define the constructor in the subclass in unstable_mux_async_iterator.ts. Can you work on that change?

@scarf005 scarf005 force-pushed the feat/6086/stdasync-make-`MuxAsyncIterator`-accept-varargs branch 3 times, most recently from 374d2b1 to 48d5871 Compare October 8, 2024 03:50
@scarf005 scarf005 force-pushed the feat/6086/stdasync-make-`MuxAsyncIterator`-accept-varargs branch from 48d5871 to 7a7efd2 Compare October 8, 2024 03:51
@scarf005
Copy link
Contributor Author

scarf005 commented Oct 8, 2024

Thanks for the PR.

not sure how to handle unstable as it needs to modify class constructor.

I think we can extend the class and define the constructor in the subclass in unstable_mux_async_iterator.ts. Can you work on that change?

applied in 7a7efd2 (#6087).

@kt3k
Copy link
Member

kt3k commented Oct 8, 2024

I changed the implementation a bit to reduce the repetition.

@kt3k kt3k changed the title feat(async): accept iterator varargs in MuxAsyncIterator feat(async/unstable): accept iterator varargs in MuxAsyncIterator Oct 8, 2024
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kt3k kt3k merged commit c221924 into denoland:main Oct 8, 2024
17 checks passed
#throws: any[] = [];
#signal = Promise.withResolvers<void>();

export class MuxAsyncIterator<T> extends MaxAsyncIterator_<T> {
Copy link
Contributor Author

@scarf005 scarf005 Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MaxAsyncIterator_ seems to be a typo of MuxAsyncIterator_?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, true. Thanks for pointing. Can you send a PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opened #6096

@scarf005 scarf005 deleted the feat/6086/stdasync-make-`MuxAsyncIterator`-accept-varargs branch October 8, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@std/async: make MuxAsyncIterator accept varargs
2 participants