Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Symbol.asyncIterator interop point? #26

Closed
benlesh opened this issue Apr 14, 2016 · 2 comments
Closed

Symbol.asyncIterator interop point? #26

benlesh opened this issue Apr 14, 2016 · 2 comments

Comments

@benlesh
Copy link

benlesh commented Apr 14, 2016

It would be really great for interop with libraries like RxJS if there were a way to identify the difference between an ordinary iterator and an async iterator.

Perhaps I'm missing something in this spec, but is there a way to do this? If not, can we add a [Symbol.asyncIterator]() that simply returns the async iterator? This would make Observable.from(asyncIterator) much more doable.

@zenparsing
Copy link
Member

Yes, there's a Symbol.asyncIterator which works as you would expect.

@benlesh
Copy link
Author

benlesh commented Apr 14, 2016

Great! I'll close this then.

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

No branches or pull requests

2 participants