UNPKG

ramda-generators

Version:

A collection of lazily evaluated generators and functions to work with generators in Javascript and Typescript, following the style of Ramda's functions

13 lines (12 loc) 427 B
import { GEN } from "./utils"; declare type CountBy<TYPE extends "sync" | "async"> = { <T, R>(fn: (el: T) => string, gen: GEN<TYPE, T>): GEN<TYPE, { [key: string]: number; }>; <T, R>(fn: (el: T) => string): (gen: GEN<TYPE, T>) => GEN<TYPE, { [key: string]: number; }>; }; export declare const countBy: CountBy<"sync">; export declare const countByAsync: CountBy<"async">; export {};