Open gurpreetatwal opened 4 years ago
Two potential resolutions:
iterable
and replace it with string
iterable
My vote is for resolution two for the following reasons:
map
to support all Iterables fixes my problemMore 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 iteratee
function? Just want to make sure we're looking at the same thing
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