diff --git a/src/lib/es2023.array.d.ts b/src/lib/es2023.array.d.ts index 6615937424fa1..77f3766c5c728 100644 --- a/src/lib/es2023.array.d.ts +++ b/src/lib/es2023.array.d.ts @@ -31,7 +31,7 @@ interface Array { * Returns a copy of an array with its elements sorted. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. * ```ts * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] * ``` @@ -109,7 +109,7 @@ interface ReadonlyArray { * Copies and sorts the array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. * ```ts * [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22] * ``` diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index 2b0b01abe2cb6..ae5c1e2b60bbf 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -1366,7 +1366,7 @@ interface Array { * This method mutates the array and returns a reference to the same array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order. * ```ts * [11,2,22,1].sort((a, b) => a - b) * ``` diff --git a/tests/lib/lib.d.ts b/tests/lib/lib.d.ts index 7266b020156ab..4bbda4f3b6130 100644 --- a/tests/lib/lib.d.ts +++ b/tests/lib/lib.d.ts @@ -1068,7 +1068,7 @@ interface Array { /** * Sorts an array. - * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order. + * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, UTF-16 code unit order. */ sort(compareFn?: (a: T, b: T) => number): T[]; @@ -1612,7 +1612,7 @@ interface Int8Array { /** * Sorts an array. * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. + * omitted, the elements are sorted in ascending, numerical order. */ sort(compareFn?: (a: number, b: number) => number): Int8Array; @@ -1885,7 +1885,7 @@ interface Uint8Array { /** * Sorts an array. * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. + * omitted, the elements are sorted in ascending, numerical order. */ sort(compareFn?: (a: number, b: number) => number): Uint8Array; @@ -2159,7 +2159,7 @@ interface Uint8ClampedArray { /** * Sorts an array. * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. + * omitted, the elements are sorted in ascending, numerical order. */ sort(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; @@ -2432,7 +2432,7 @@ interface Int16Array { /** * Sorts an array. * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. + * omitted, the elements are sorted in ascending, numerical order. */ sort(compareFn?: (a: number, b: number) => number): Int16Array; @@ -2706,7 +2706,7 @@ interface Uint16Array { /** * Sorts an array. * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. + * omitted, the elements are sorted in ascending, numerical order. */ sort(compareFn?: (a: number, b: number) => number): Uint16Array; @@ -2979,7 +2979,7 @@ interface Int32Array { /** * Sorts an array. * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. + * omitted, the elements are sorted in ascending, numerical order. */ sort(compareFn?: (a: number, b: number) => number): Int32Array; @@ -3252,7 +3252,7 @@ interface Uint32Array { /** * Sorts an array. * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. + * omitted, the elements are sorted in ascending, numerical order. */ sort(compareFn?: (a: number, b: number) => number): Uint32Array; @@ -3525,7 +3525,7 @@ interface Float32Array { /** * Sorts an array. * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. + * omitted, the elements are sorted in ascending, numerical order. */ sort(compareFn?: (a: number, b: number) => number): Float32Array; @@ -3799,7 +3799,7 @@ interface Float64Array { /** * Sorts an array. * @param compareFn The name of the function used to determine the order of the elements. If - * omitted, the elements are sorted in ascending, ASCII character order. + * omitted, the elements are sorted in ascending, numerical order. */ sort(compareFn?: (a: number, b: number) => number): Float64Array;