-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(LimitedCollection): export LimitedCollection #6043
feat(LimitedCollection): export LimitedCollection #6043
Conversation
Please remove the |
Removed |
Should I add typings in Collections region? |
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.
There is still the issue with implicitly creating new instances of LimitedCollection
through its methods, e.g. clone
, filter
.
TS will say those are LimitedCollection
s, but they actually are Collections
.
(Creating new LimitedCollection
s is not possible without modifying Collection
and thinking of a way to derive new arbitrary child instances)
I don't know of a way to make TS aware of Symbol.species
and overwriting all methods to specify that actually a Collection
is returned is error prone and tedious.
So I suppose 🤷
Yeah, moving the declaration for |
This needs a rebase. |
Please describe the changes this PR makes and why it should be merged:
Closes #4274, I don't know why it isn't exported
Status and versioning classification: