-
Notifications
You must be signed in to change notification settings - Fork 34
Fix AsyncIterator.prototype.flatMap to flatMap async iterables #57
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM.
Actually I just realized this isn't quite correct, because it passes the (potentially) sync method to |
Perhaps the best way would be to change
|
I think the spec usually uses GetMethod here rather than GetIterator for that? |
So the issue with my PR is that calling The other option is to do something like:
(NOTE: The only reason for This seems kinda redundant though as it's basically just the implementation of |
fwiw this is why i hadn't added the async-specific code yet :P I think adding a param to GetIterator is okay, although it should probably be more like |
I agree, I'm not super familiar with the markup so I wasn't sure what to put. I'll make another PR that replaces |
@Jamesernator I don't think you need to do the |
Currently the spec seems to flatMap only sync iterables from within async iterables, this is presumably a bug as it
Await
s theIteratorNext()
anyway.This also fixes that and an unrelated typo referring to a non-existent variable
nextNext
.