UNPKG

@reactivex/ix-esnext-esm

Version:

The Interactive Extensions for JavaScript

3 lines (2 loc) 410 B
export declare function toMap<TSource, TKey>(source: AsyncIterable<TSource>, keySelector: (item: TSource) => TKey | Promise<TKey>): Promise<Map<TKey, TSource>>; export declare function toMap<TSource, TKey, TElement = TSource>(source: AsyncIterable<TSource>, keySelector: (item: TSource) => TKey | Promise<TKey>, elementSelector?: (item: TSource) => TElement | Promise<TElement>): Promise<Map<TKey, TElement>>;