You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the Map and Set constructors were defined TC39 discussed allowing an "array-like" to be passed to them as an alternative to passing an Iterable. But the final conclusion was to not allow that. Map.from and Set.from should probably follow that precedent.
(The reason Array.from does accept an "array-like" was to provide a way to easily convert an "array-like" to an Array. The requirement doesn't seem to necessary for Maps or Sets)
The text was updated successfully, but these errors were encountered:
It feels incomplete without accepting the array-like, but your feedback on the final conclusion has a higher value here and I don't want to revive this discussion. I removed it.
When the Map and Set constructors were defined TC39 discussed allowing an "array-like" to be passed to them as an alternative to passing an Iterable. But the final conclusion was to not allow that. Map.from and Set.from should probably follow that precedent.
(The reason Array.from does accept an "array-like" was to provide a way to easily convert an "array-like" to an Array. The requirement doesn't seem to necessary for Maps or Sets)
The text was updated successfully, but these errors were encountered: