import { Sort } from './types';
/** Comparator for Array.sort when sorting arrays of objects by given key with optional order. */
export 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. */
export declare function toggleItem<T>(array: T[], item: T): T[];
//# sourceMappingURL=array.d.ts.map