/** * Return an object containing arrays organized by property * * @param array - The array to split * @param key - The object property to split by * @returns An object containing arrays separated by property value * * @example * interface MyObj { * a: string; * b: number; * } * const myArray: MyObj[] = [{a: 'foo', b: 1}, {a: 'bar', b: 6}, {a: 'foo', b: 6}]; * groupBy(myArray, 'a'); * Returns: * { * foo: [{a: 'foo', b: 1}, {a: 'foo', b: 6}], * bar: [{a: 'bar', b: 6}], * } */ export declare function groupBy(array: T[], key: K): { [id: string]: T[]; };