grafast
Version:
Cutting edge GraphQL planning and execution engine
12 lines • 820 B
TypeScript
import type { Step } from "../step.ts";
import type { ItemsStep, StepRepresentingList } from "./connection.ts";
import type { __ListTransformStep, ListTransformItemPlanCallback } from "./listTransform.ts";
export type GroupByPlanMemo = Map<unknown, unknown[]>;
/**
* Takes a single dimensional list plan and a mapper that returns a grouping
* key. Returns a plan that results in a Map where the keys are the grouping
* keys and the values are lists of the original entries that match these
* grouping keys.
*/
export declare function groupBy<TListStep extends StepRepresentingList<any>, TItemStep extends Step<number>>(listStep: TListStep, mapper: ListTransformItemPlanCallback<ItemsStep<TListStep>, TItemStep>): __ListTransformStep<TListStep, TItemStep, GroupByPlanMemo, any>;
//# sourceMappingURL=groupBy.d.ts.map