import { Task } from 'fp-ts/lib/Task'; import { MaybeAsync } from './maybe-async'; import type { AsyncStream } from '../uri'; /** * Map each item of a {@link AsyncStream} to a key and count how mony map to * each key. * * @export * @template A The type of the item. * @param {(x: A) => MaybeAsync} f The key from value function. * @return {(input: AsyncStream) => Record} A function that will * take a {@link AsyncStream} and returns the counts of its mapped values. * * @__PURE__ */ export declare function countBy(f: (x: A) => MaybeAsync): (input: AsyncStream) => Task>;