import { ComparerFunction } from "../collections/comparison"; /** * Sorts the specified array in-place. * This function intends to implement stable sort. * * @param array the array to get sorted. * @param comparer an optional callback used to compare the elements. * `undefined` elements will be passed in to it nevertheless. * * @todo Implement this function without `Array.sort` -- it is too tricky and might be slow. */ export declare function sort(array: T[], comparer?: ComparerFunction): void; /** * Provides default implementation for sorting JS arrays. * * @remarks * The implementation sorts the array with the following order * * undefined * * null * * boolean (false, true) * * number / bigint * * string * * object * * `object`s of the same type are compared with the comparer function retrieved from {@link getComparer}. * Attempting to compare other primitive types, or object types that are yet to be registered (with {@link registerComparer}) * will cause {@link InvalidOperationError}. */ export declare function defaultArrayComparer(x: unknown, y: unknown): number; //# sourceMappingURL=sorting.d.ts.map