import { Sortable, SortableKey, SortableOrder } from './types'; /** * Sorts an array of objects by a given key. * @template T The type of the object. * @param {T[]} items The array of objects. * @param {SortableKey} key The key to sort by. * @param {SortableOrder} [order='desc'] The order of sorting. * @returns {T[]} The sorted array. * * @example * sortBy([{ id: 2 }, { id: 1 }], 'id', 'asc'); // Output: [{ id: 1 }, { id: 2 }] */ export default function sortBy>(items: T[], key: SortableKey, order?: SortableOrder): T[]; //# sourceMappingURL=sortBy.d.ts.map