Skip to content

IReadOnlyObservableCollection.reduceRight

github-actions[bot] edited this page Dec 3, 2024 · 3 revisions

This method has multiple overloads.


Reduces the collection to a single item iterating the collection from end to start.

reduceRight(
  callback: (previousItem: TItem, currentItem: TItem, currentIndex: number, collection: this) => TItem
): TItem

Source reference: src/collections/observableCollections/IReadOnlyObservableCollection.ts:266.

Parameters

  • callback: (previousItem:TItem, currentItem:TItem, currentIndex:number, collection:this) => TItem
    The callback that aggregates two items at a time.

Returns: TItem

Returns a single aggregated item.

See also


Reduces the collection to a single item iterating the collection from end to start.

reduceRight<TResult>(
  callback: (result: TResult, item: TItem, index: number, collection: this) => TResult,
  initialValue: TResult
): TResult

Source reference: src/collections/observableCollections/IReadOnlyObservableCollection.ts:275.

Generic Parameters

  • TResult - The result value type to which items are aggregated.

Parameters

  • callback: (result:TResult, item:TItem, index:number, collection:this) => TResult
    The callback that aggregates one item and the previous value at a time.

  • initialValue: TResult
    The initial value when aggregating the collection.

Returns: TResult

Returns the value containing the aggregated collection.

See also

Clone this wiki locally