import { Sort } from "./types.js";

//#region src/utils/array.d.ts
/** Comparator for Array.sort when sorting arrays of objects by given key with optional order. */
declare function compareBy<T extends object, K extends keyof T>(key: K, order?: Sort['order']): (item1: T, item2: T) => number;
/** Adds given item to the array if it wasn't there yet, or removes it otherwise. */
declare function toggleItem<T>(array: T[], item: T): T[];
//#endregion
export { compareBy, toggleItem };

//# sourceMappingURL=array.d.ts.map