feat: Add missing JsTypedArray wrapper methods#5009
Conversation
Implemented entries, keys, values, @@iterator, and toString wrapper methods on JsTypedArray and its subclasses. Added unit tests for verification. Resolves boa-dev#3252
…rigin fix/js-typed-array-missing-methods
Test262 conformance changes
Tested main commit: |
|
Hey @jedel1043 Can you please check this out and tell me if any change is needed? |
jedel1043
left a comment
There was a problem hiding this comment.
Thank you. In the future we'd want to reevaluate the exact shape of the APIs because just returning JsValue is a bit painful to use, but just having the methods already brings a lot of value.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5009 +/- ##
===========================================
+ Coverage 47.24% 58.47% +11.22%
===========================================
Files 476 559 +83
Lines 46892 61452 +14560
===========================================
+ Hits 22154 35932 +13778
- Misses 24738 25520 +782 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Head branch was pushed to by a user without write access
This PR adds missing Rust wrapper methods for
TypedArrayinJsTypedArrayand its subclasses, specifically resolving part of #3252.Changes:
entries(),keys(),values(),@@iterator()(usingvalues), andtoString()(usingArray.prototype.toString).entriesandvaluesinBuiltinTypedArraytopub(crate)to allow access from the wrappers.jstypedarray.rsverify the new methods.All unit tests pass.