ReadOnlyObservableCollection.reduceRight - Andrei15193/react-model-view-viewmodel GitHub Wiki
API / ReadOnlyObservableCollection<TItem> / reduceRight method
This method has multiple overloads.
Reduces the collection to a single item iterating the collection from end to start.
public reduceRight(
callback: (previousItem: TItem, currentItem: TItem, currentIndex: number, collection: this) => TItem
): TItem
Source reference: src/collections/observableCollections/ReadOnlyObservableCollection.ts:451
.
-
callback: (previousItem:TItem, currentItem:TItem, currentIndex:
number
, collection:this
) => TItem
The callback that aggregates two items at a time.
Returns a single aggregated item.
Reduces the collection to a single item iterating the collection from end to start.
public reduceRight<TResult>(
callback: (result: TResult, item: TItem, index: number, collection: this) => TResult,
initialValue: TResult
): TResult
Source reference: src/collections/observableCollections/ReadOnlyObservableCollection.ts:460
.
- TResult - The result value type to which items are aggregated.
-
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 the value containing the aggregated collection.