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

ES2015 TypedArrays missing all methods they ought to share with regular Arrays, like map/indexOf/includes etc #1411

Closed
p-bakker opened this issue Nov 3, 2023 · 6 comments
Labels
Arrays Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec feature Issues considered a new feature
Milestone

Comments

@p-bakker
Copy link
Collaborator

p-bakker commented Nov 3, 2023

All TypedArray implementations ought to have a large chunk of methods that regular Arrays also have, like indexOf/includes/map/forEach etc. However, those all seem to be missing, see https://compat-table.github.io/compat-table/es6/ > built-ins > typed arrays

In addition to the missing methods that are defined in ES2015 (ES6):

@p-bakker p-bakker added the feature Issues considered a new feature label Nov 3, 2023
@p-bakker p-bakker added this to the ES2015 milestone Nov 3, 2023
@p-bakker p-bakker added the Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec label Jul 30, 2024
@p-bakker
Copy link
Collaborator Author

@andreabergia do you agree that all method are now implement (albeit having failing tests here and there), except for static stuff that ought to be implemented in the missing TypedArray prototype?

If so, I think we can close this case, as we have individual cases for the other stuff, agree?

@gbrail
Copy link
Collaborator

gbrail commented Aug 23, 2024 via email

@p-bakker
Copy link
Collaborator Author

I think doing that in #1565, which involves creating a NativeTypedArray class containing most of the scripting API impl. And have that be the prototype for all typed array constructors would make sense

@p-bakker
Copy link
Collaborator Author

p-bakker commented Sep 6, 2024

@andreabergia what's your take on whether the scope of just adding the missing method is now done or not?

@andreabergia
Copy link
Contributor

@andreabergia do you agree that all method are now implement (albeit having failing tests here and there), except for static stuff that ought to be implemented in the missing TypedArray prototype?

If so, I think we can close this case, as we have individual cases for the other stuff, agree?

Sorry for the late answer.
I agree with you - everything should be implemented, except for the static TypedArray.from and .of. I couldn't find an issue for those, though.

@p-bakker
Copy link
Collaborator Author

Everything mentioned in this case for done in various derived cases and PRs, so closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrays Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec feature Issues considered a new feature
Projects
None yet
Development

No branches or pull requests

3 participants