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

toStream should produce an iterable, for better compatiblity with other libs #37

Open
phiresky opened this issue Jan 26, 2017 · 4 comments

Comments

@phiresky
Copy link

Just spent some time trying to get it to work with the npm package rx but it didn't work. I only noticed I had to use RxJS 5 (npm package rxjs) when I looked at the relevant tests file.
With RxJS 5 the examples work fine.

The errors were:
(toStream)

Uncaught TypeError: Object is not iterable
    at getIterable (rx.all.js:2706)
    at FromObservable.subscribeCore (rx.all.js:2634)
    at FromObservable.tryCatcher (rx.all.js:63)
    at setDisposable (rx.all.js:2082)

(fromStream)

Cannot read property fn of undefined
(forgot to save stack trace)
@mweststrate
Copy link
Member

@phiresky the goal is to be compatible with any stream library through Symbol.observable. Did you test it in an environment that supports Symbols without accidentally compiling / polyfilling down to ES5?

@mweststrate
Copy link
Member

Ah probably rx itself doesn't support Symbol.observable yet? Adding support for Symbol.iterable as well around here will probably fix the issue

@mweststrate
Copy link
Member

Closed for inactivity

@mweststrate mweststrate reopened this Jun 13, 2017
@mweststrate mweststrate changed the title Clarify that from/toStream only works with RxJS 5 toStream should produce an iterable, for better compatiblity with other libs Jun 13, 2017
@hudzenko
Copy link

hudzenko commented Aug 1, 2019

Smth related I think...
benlesh/symbol-observable#38
In angular I had to add polyfill:
import 'core-js/features/symbol/observable';
As mentioned above Symbol.observable is not supported for some reason in rxjs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants