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: Support ReadableStream as an ObservableInput #6006

Closed
benlesh opened this issue Feb 8, 2021 · 2 comments · Fixed by #6163
Closed

Feat: Support ReadableStream as an ObservableInput #6006

benlesh opened this issue Feb 8, 2021 · 2 comments · Fixed by #6163
Labels
AGENDA ITEM Flagged for discussion at core team meetings

Comments

@benlesh
Copy link
Member

benlesh commented Feb 8, 2021

Although RxJS gets a LOT of use in Node, RxJS's primary space has been in the browser. Based off of discussion in this Twitter thread about fetch streaming

We might want to support duck-typing ReadableStream<T> as an ObservableInput<T>.

If we did this, it might be beneficial, especially in the fetch API. But it's probably worth investigating what all use cases might exist.

I definitely think if it's added to from, schedule, and internally, innerFrom, it would need to be the absolute last thing checked. The presence of asyncIterator or iterator should definitely beat out a check for typeof o.getReader === 'function'.

This would be a lightweight and powerful add, IMO.

@jayphelps generously volunteered to do the work.

@jayphelps
Copy link
Member

The presence of asyncIterator or iterator should definitely beat out a check for typeof o.getReader === 'function'.

Agreed.


I'll hold off until there is true consensus that this would want to be landed, since while it's not "hard" it's also not a 5 minute thing to PR.

@benlesh benlesh added the AGENDA ITEM Flagged for discussion at core team meetings label Feb 9, 2021
@benlesh
Copy link
Member Author

benlesh commented Feb 10, 2021

General approval from the core team 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AGENDA ITEM Flagged for discussion at core team meetings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants