@idealic/poker-engine
Version:
Professional poker game engine and hand evaluator with built-in iterator utilities
12 lines • 664 B
TypeScript
/**
* Functions for transforming elements of an iterable using a mapper function
*/
import { AnyIterable } from './types';
/**
* Creates a function that transforms elements of an iterable
* If concurrency is provided, processes the iterable concurrently
*/
export type MapFunction<T, R> = (item: T, index: number, iterable: AnyIterable<T>) => R;
export declare function map<T, R>(input: AnyIterable<T>, transform: MapFunction<T, R>, concurrency?: number): AsyncGenerator<Awaited<R>>;
export declare function map<T, R>(transform: MapFunction<T, R>, concurrency?: number): (input: AnyIterable<T>) => AsyncGenerator<Awaited<R>>;
//# sourceMappingURL=map.d.ts.map