diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index 42c6018aed1..b8ea021c4f5 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -1238,6 +1238,9 @@ interface Array { * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` */ sort(compareFn?: (a: T, b: T) => number): this; /** @@ -1881,6 +1884,9 @@ interface Int8Array { * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` */ sort(compareFn?: (a: number, b: number) => number): this; @@ -2157,6 +2163,9 @@ interface Uint8Array { * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` */ sort(compareFn?: (a: number, b: number) => number): this; @@ -2433,6 +2442,9 @@ interface Uint8ClampedArray { * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` */ sort(compareFn?: (a: number, b: number) => number): this; @@ -2707,6 +2719,9 @@ interface Int16Array { * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` */ sort(compareFn?: (a: number, b: number) => number): this; @@ -2984,6 +2999,9 @@ interface Uint16Array { * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` */ sort(compareFn?: (a: number, b: number) => number): this; @@ -3260,6 +3278,9 @@ interface Int32Array { * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` */ sort(compareFn?: (a: number, b: number) => number): this; @@ -3535,6 +3556,9 @@ interface Uint32Array { * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` */ sort(compareFn?: (a: number, b: number) => number): this; @@ -3811,6 +3835,9 @@ interface Float32Array { * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` */ sort(compareFn?: (a: number, b: number) => number): this; @@ -4088,6 +4115,9 @@ interface Float64Array { * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if first argument is less than second argument, zero if they're equal and a positive * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * ```ts + * [11,2,22,1].sort((a, b) => a - b) + * ``` */ sort(compareFn?: (a: number, b: number) => number): this;