Skip to content
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

Array.lastIndex polyfill contains no set accessor #968

Closed
overly-engineered opened this issue Aug 4, 2021 · 2 comments
Closed

Array.lastIndex polyfill contains no set accessor #968

overly-engineered opened this issue Aug 4, 2021 · 2 comments

Comments

@overly-engineered
Copy link

The proposal for Array.prototype.lastIndex as defined here contains both get and set accessors.

The polyfill implemented here contains only the get accessor https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array.last-index.js.

Can I either update this polyfill to include a setter as well or as the proposal is now paused can I remove the current lastIndex polyfill as it is unlikely to be moved on further.

@overly-engineered overly-engineered changed the title Array.lastIndex polyfill contains not set method Array.lastIndex polyfill contains no set accessor Aug 4, 2021
@zloirock
Copy link
Owner

zloirock commented Aug 4, 2021

As you can see in the spec draft, .lastIndex should be only a getter, so the core-js implementation is correct.

I'm not sure will this proposal be available in core-js@4 or not because of the current state of the proposal, will see it later.

@zloirock zloirock closed this as completed Aug 4, 2021
@overly-engineered
Copy link
Author

Oh, that's my bad, I was looking at lastItem. It would be great to see it removed if the proposal starts to languish. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants