This PR implements ES2023 TypedArray.prototype.toSorted method.
See also:
PR for TypedArray.prototype.toReversed: #1366
PR for TypedArray.prototype.with: #1365
I am creating separate PRs for each method in case there are any suggestions or change requests from your side, so that PRs are more independent.
Test Plan
Code is annotated with algorithm steps from EcmaScript specification for easier verification and maintenance.
I also added tests to verify that methods work as intended. There might be some more edge cases that might be covered based on your experience.
Summary
This PR implements ES2023
TypedArray.prototype.toSorted
method.See also:
TypedArray.prototype.toReversed
: #1366TypedArray.prototype.with
: #1365I am creating separate PRs for each method in case there are any suggestions or change requests from your side, so that PRs are more independent.
Test Plan
Code is annotated with algorithm steps from EcmaScript specification for easier verification and maintenance. I also added tests to verify that methods work as intended. There might be some more edge cases that might be covered based on your experience.