diff --git a/src/add/asynciterable-operators/tomap.ts b/src/add/asynciterable-operators/tomap.ts index fc8b9672..64726678 100644 --- a/src/add/asynciterable-operators/tomap.ts +++ b/src/add/asynciterable-operators/tomap.ts @@ -3,7 +3,7 @@ import { toMap, ToMapOptions } from '../../asynciterable/tomap'; export async function toMapProto( this: AsyncIterable, - options: ToMapOptions + options: ToMapOptions ): Promise> { return toMap(this, options); } diff --git a/src/add/iterable-operators/tomap.ts b/src/add/iterable-operators/tomap.ts index 7ba1180e..dd51431d 100644 --- a/src/add/iterable-operators/tomap.ts +++ b/src/add/iterable-operators/tomap.ts @@ -3,7 +3,7 @@ import { toMap, ToMapOptions } from '../../iterable/tomap'; export function toMapProto( this: IterableX, - options: ToMapOptions + options: ToMapOptions ): Map { return toMap(this, options); } diff --git a/src/asynciterable/tomap.ts b/src/asynciterable/tomap.ts index 95f7b991..eb5d7d8f 100644 --- a/src/asynciterable/tomap.ts +++ b/src/asynciterable/tomap.ts @@ -10,13 +10,13 @@ import { throwIfAborted } from '../aborterror'; * @template TElement * @ignore */ -export interface ToMapOptions { +export interface ToMapOptions { /** * The selector to get the key for the map. * * @memberof ToMapOptions */ - keySelector: (item: TSource, signal?: AbortSignal) => TElement | Promise; + keySelector: (item: TSource, signal?: AbortSignal) => TKey | Promise; /** * The selector used to get the element for the Map. * @@ -44,7 +44,7 @@ export interface ToMapOptions { */ export async function toMap( source: AsyncIterable, - options: ToMapOptions + options: ToMapOptions ): Promise> { const { ['signal']: signal, diff --git a/src/iterable/tomap.ts b/src/iterable/tomap.ts index 3ec72d8a..758de6ed 100644 --- a/src/iterable/tomap.ts +++ b/src/iterable/tomap.ts @@ -8,13 +8,13 @@ import { identity } from '../util/identity'; * @template TElement * @ignore */ -export interface ToMapOptions { +export interface ToMapOptions { /** * The selector to get the key for the map. * * @memberof ToMapOptions */ - keySelector: (item: TSource) => TElement; + keySelector: (item: TSource) => TKey; /** * The selector used to get the element for the Map. * @@ -35,7 +35,7 @@ export interface ToMapOptions { */ export function toMap( source: Iterable, - options: ToMapOptions + options: ToMapOptions ): Map { const { ['elementSelector']: elementSelector = identity as any,