File tree 2 files changed +0
-18
lines changed
tests/baselines/reference/api
2 files changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -1029,23 +1029,6 @@ namespace ts {
1029
1029
return array . slice ( ) . sort ( comparer ) ;
1030
1030
}
1031
1031
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
-
1049
1032
export function arrayIterator < T > ( array : ReadonlyArray < T > ) : Iterator < T > {
1050
1033
let i = 0 ;
1051
1034
return { next : ( ) => {
Original file line number Diff line number Diff line change @@ -225,7 +225,6 @@ declare namespace ts {
225
225
* Returns a new sorted array.
226
226
*/
227
227
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;
229
228
function arrayIterator<T>(array: ReadonlyArray<T>): Iterator<T>;
230
229
/**
231
230
* 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