/** * Class representing a sorting utility. */ export default class Sorting { private readonly arr; private readonly query; /** * Create a Sorting instance. * @param arr - The array to be sorted. * @param query - The query object containing the sorting key and order. */ constructor(arr: any[], query: { [s: string]: unknown; } | ArrayLike); /** * Sort the array based on the query. * Optimized for performance using native comparison operators. * @param arr - The array to be sorted. * @param query - The query object containing the sorting key and order. * @returns A promise that resolves to the sorted array. */ sort(aditionalField?: string): Promise; }