• Groups the elements of an async-iterable sequence and selects the resulting elements by using a specified function.

    Type Parameters

    • TSource

      The type of the elements in the source sequence.

    • TKey

      The type of the grouping key computed for each element in the source sequence.

    Parameters

    • keySelector: ((value, signal?) => TKey | Promise<TKey>)

      A function to extract the key for each element.

        • (value, signal?): TKey | Promise<TKey>
        • Parameters

          • value: TSource
          • Optional signal: AbortSignal

          Returns TKey | Promise<TKey>

    Returns OperatorAsyncFunction<TSource, GroupedAsyncIterable<TKey, TSource>>

    A sequence of async-iterable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.

  • Groups the elements of an async-iterable sequence and selects the resulting elements by using a specified function.

    Type Parameters

    • TSource

      The type of the elements in the source sequence.

    • TKey

      The type of the grouping key computed for each element in the source sequence.

    • TValue

      The type of the elements within the groups computed for each element in the source sequence.

    Parameters

    • keySelector: ((value, signal?) => TKey | Promise<TKey>)

      A function to extract the key for each element.

        • (value, signal?): TKey | Promise<TKey>
        • Parameters

          • value: TSource
          • Optional signal: AbortSignal

          Returns TKey | Promise<TKey>

    • Optional elementSelector: ((value, signal?) => TValue | Promise<TValue>)

      A function to map each source element to an element in an async-enumerable group.

        • (value, signal?): TValue | Promise<TValue>
        • Parameters

          • value: TSource
          • Optional signal: AbortSignal

          Returns TValue | Promise<TValue>

    Returns OperatorAsyncFunction<TSource, GroupedAsyncIterable<TKey, TValue>>

    A sequence of async-iterable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.

Generated using TypeDoc