Skip to content

Breaking: Rename "Iterable" to "Collection" #1139

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

Merged
merged 3 commits into from
Mar 11, 2017
Merged

Conversation

leebyron
Copy link
Collaborator

This change is a major renaming of the base class in Immutable.js from Iterable to Collection. In doing so the existing Collection subclass is completely removed from the hierarchy.

In my experience the difference between the two has been a constant point of confusion for newcomers to the library, and with ES2015 becoming a standard part of the development environment, the name Iterable has become ambiguous at best and required awkward workarounds in type definitions before this change.

To ease conversion, the Collection class is still also exported as Iterable and the new isCollection function is aliased as isIterable - existing code will not break.

@leebyron leebyron force-pushed the iterable-collection branch from 11d27af to 97cb151 Compare March 10, 2017 22:37
@leebyron leebyron merged commit c93bb75 into master Mar 11, 2017
@leebyron leebyron deleted the iterable-collection branch March 11, 2017 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants