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

9 lines (8 loc) 373 B
import { GEN } from "./utils"; declare type FlatMap<TYPE extends "sync" | "async"> = { <T, R>(fn: (el: T) => R[] | Generator<R>, gen: GEN<TYPE, T>): GEN<TYPE, R>; <T, R>(fn: (el: T) => R[] | Generator<R>): (gen: GEN<TYPE, T>) => GEN<TYPE, R>; }; export declare const flatMap: FlatMap<"sync">; export declare const flatMapAsync: FlatMap<"async">; export {};