diff --git a/src/compiler/core.ts b/src/compiler/core.ts index a3910334286..7f165a171f8 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -992,11 +992,15 @@ namespace ts { } /** - * Performs a binary search, finding the index at which 'value' occurs in 'array'. + * Performs a binary search, finding the index at which `value` occurs in `array`. * If no such index is found, returns the 2's-complement of first index at which - * number[index] exceeds number. + * `array[index]` exceeds `value`. * @param array A sorted array whose first element must be no larger than number - * @param number The value to be searched for in the array. + * @param value The value to be searched for in the array. + * @param keySelector A callback used to select the search key from `value` and each element of + * `array`. + * @param keyComparer A callback used to compare two keys in a sorted array. + * @param offset An offset into `array` at which to start the search. */ export function binarySearch(array: ReadonlyArray, value: T, keySelector: (v: T) => U, keyComparer: Comparer, offset?: number): number { if (!array || array.length === 0) {