Comparetype
(left: T, right: T, ...args: A) => number
Function that can compare two values for sorting.
- Returns a negative number if
leftsorts beforeright, positive if after, or0if equally ranked (likeArray.prototype.sort()).
(left: T, right: T, ...args: A) => number
Function that can compare two values for sorting.
left sorts before right, positive if after, or 0 if equally ranked (like Array.prototype.sort()).