You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
pankaj-bind
changed the title
Compiler is not supporting TypedArray.prototype.toSorted() and TypedArray.prototype.wiith() method
Compiler have no support for TypedArray.prototype.toSorted() and TypedArray.prototype.wiith() method
Aug 22, 2024
@the reason is the NodeJS version you are currently using. The methods are newly introduced and the version you are using does not support yet.
Here is the example code snippet of these two methods
// TypedArray.prototype.toSorted()
const numbers = new Int16Array([5, 1, 8, 3, 2]);
const sortedNumbers = numbers.toSorted();
console.log(sortedNumbers); // Output: Int16Array(5) [1, 2, 3, 5, 8]
console.log(numbers); // Output: Int16Array(5) [5, 1, 8, 3, 2]
// TypedArray.prototype.with()
const numbers = new Int8Array([1, 3, 5, 7, 9]);
const modifiedNumbers = numbers.with(2, 10);
console.log(numbers); // Output: Int8Array(5) [1, 3, 5, 7, 9] (original remains unchanged)
console.log(modifiedNumbers); // Output: Int8Array(5) [1, 3, 10, 7, 9]
The text was updated successfully, but these errors were encountered: