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) 517 B
import { GEN } from "./utils"; declare type Scan<TYPE extends "sync" | "async"> = { <T, R>(fn: (acc: R, el: T) => R, init: R, gen: GEN<TYPE, T>): GEN<TYPE, R>; <T, R>(fn: (acc: R, el: T) => R, init: R): (gen: GEN<TYPE, T>) => GEN<TYPE, R>; <T, R>(fn: (acc: R, el: T) => R): { (init: R, gen: GEN<TYPE, T>): GEN<TYPE, R>; (init: R): (gen: GEN<TYPE, T>) => GEN<TYPE, R>; }; }; export declare const scan: Scan<"sync">; export declare const scanAsync: Scan<"async">; export {};