/** * The options for the toMap method which include an optional element selector and abort signal for cancellation. * * @interface ToMapOptions * @template TSource * @template TElement */ export interface ToMapOptions { /** * The selector to get the key for the map. * * @memberof ToMapOptions */ keySelector: (item: TSource, signal?: AbortSignal) => TElement | Promise; /** * The selector used to get the element for the Map. * * @memberof ToMapOptions */ elementSelector?: (item: TSource, signal?: AbortSignal) => TElement | Promise; /** * An optional abort signal to cancel the operation at any time. * * @type {AbortSignal} * @memberof ToMapOptions */ signal?: AbortSignal; } /** * Converts an async-iterable to a map with a key selector and options for an element selector and cancellation. * * @export * @template TSource The type of elements in the source collection. * @template TKey The type of key used for the map. * @template TElement The type of element to use for the map. * @param {AsyncIterable} source The source collection to turn into a map. * @param {ToMapOptions} [options] * @returns {(Promise>)} */ export declare function toMap(source: AsyncIterable, options: ToMapOptions): Promise>;