import { Input, Output } from "../output"; /** * {@link toObject} takes an array of T values, and a selector that produces * key/value pairs from those inputs, and converts this array into an output * object with those keys and values. * * For instance, given an array as follows * * [{ s: "a", n: 1 }, { s: "b", n: 2 }, { s: "c", n: 3 }] * * and whose selector is roughly `(e) => [e.s, e.n]`, the resulting object will be * * { "a": 1, "b": 2, "c": 3 } * */ export declare function toObject(iter: Input[]>, selector: (t: T) => Input<[Input, Input]>): Output<{ [key: string]: V; }>; /** * {@link groupBy} takes an array of T values, and a selector that prduces * key/value pairs from those inputs, and converts this array into an output * object, with those keys, and where each property is an array of values, in * the case that the same key shows up multiple times in the input. * * For instance, given an array as follows * * [{ s: "a", n: 1 }, { s: "a", n: 2 }, { s: "b", n: 1 }] * * and whose selector is roughly `(e) => [e.s, e.n]`, the resulting object will be * * { "a": [1, 2], "b": [1] } * */ export declare function groupBy(iter: Input[]>, selector: (t: T) => Input<[Input, Input]>): Output<{ [key: string]: V[]; }>;