File tree Expand file tree Collapse file tree 2 files changed +0
-18
lines changed
tests/baselines/reference/api Expand file tree Collapse file tree 2 files changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -1029,23 +1029,6 @@ namespace ts {
10291029 return array . slice ( ) . sort ( comparer ) ;
10301030 }
10311031
1032- export function best < T > ( iter : Iterator < T > , isBetter : ( a : T , b : T ) => boolean ) : T | undefined {
1033- const x = iter . next ( ) ;
1034- if ( x . done ) {
1035- return undefined ;
1036- }
1037- let best = x . value ;
1038- while ( true ) {
1039- const { value, done } = iter . next ( ) ;
1040- if ( done ) {
1041- return best ;
1042- }
1043- if ( isBetter ( value , best ) ) {
1044- best = value ;
1045- }
1046- }
1047- }
1048-
10491032 export function arrayIterator < T > ( array : ReadonlyArray < T > ) : Iterator < T > {
10501033 let i = 0 ;
10511034 return { next : ( ) => {
Original file line number Diff line number Diff line change @@ -225,7 +225,6 @@ declare namespace ts {
225225 * Returns a new sorted array.
226226 */
227227 function sort<T>(array: ReadonlyArray<T>, comparer: Comparer<T>): T[];
228- function best<T>(iter: Iterator<T>, isBetter: (a: T, b: T) => boolean): T | undefined;
229228 function arrayIterator<T>(array: ReadonlyArray<T>): Iterator<T>;
230229 /**
231230 * Stable sort of an array. Elements equal to each other maintain their relative position in the array.
You can’t perform that action at this time.
0 commit comments