import { Ord, CompareFunc } from '../typings/types'; interface Sort { (fn: CompareFunc, list: ArrayLike): T[]; (fn: CompareFunc): (list: ArrayLike) => T[]; } /** * Returns a copy of the array, sorted according to the comparator function, * which should accept two values at a time and return a negative number if the * first value is smaller, a positive number if it's larger, and zero if they * are equal. Please note that this is a **copy** of the list. It does not * modify the original. * * @param {Function} comparator A sorting function * @param {Array} arr The list to sort * @return {Array} a new array with its elements sorted by the comparator function. * @example * * var diff = function(a, b) { return a - b; }; * sort(diff, [4,2,7,5]); //=> [2, 4, 5, 7] */ declare const _default: Sort; export default _default;