-
Notifications
You must be signed in to change notification settings - Fork 15
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
map does not work with iterables other than strings, arrays and plain objects #52
Comments
Two potential resolutions:
My vote is for resolution two for the following reasons:
More than happy to help out with a PR for either of those or any other solutions :) |
Do you have an idea for maintaining the same input typing for the output as the input if we support generic iterables? Generally I don't see an easy way to achieve that, which is why I'd probably rather update the docs. |
By "input typing for the output" do you mean the return value for the map function itself or for the input into the |
i.e. the return type for map is the same as the input type |
The JSDoc on
map
indicates thatinput
can be an iterable, however it doesn't seem to work with other objects that implement the iterable protocol including built-in ones likeSet
.Test Case
Expected output
Actual output
The text was updated successfully, but these errors were encountered: