ReadOnlyObservableCollection.findLast - Andrei15193/react-model-view-viewmodel GitHub Wiki
API / ReadOnlyObservableCollection<TItem> / findLast method
This method has multiple overloads.
Returns the last item that satisfies the given condition.
public findLast<TContext>(
predicate: (this: TContext, item: TItem, index: number, collection: this) => boolean,
thisArg?: TContext
): undefined | TItemSource reference: src/collections/observableCollections/ReadOnlyObservableCollection.ts:530.
- TContext - The context type in which the callback is executed.
-
predicate: (this:TContext, item:TItem, index:
number, collection:this) =>boolean
The callback performing the check. -
thisArg: TContext
A value to use as context when evaluating items.
Returns: undefined | TItem
Returns the last item for which the provided predicate evaluates to true; otherwise undefined.
Returns the last item that satisfies the given condition.
public findLast<TResult, TContext>(
predicate: (this: TContext, item: TItem, index: number, collection: this) => item is TResult,
thisArg?: TContext
): undefined | TResultSource reference: src/collections/observableCollections/ReadOnlyObservableCollection.ts:540.
-
TResult - The type of item to return.
-
TContext - The context type in which the callback is executed.
-
predicate: (this:TContext, item:TItem, index:
number, collection:this) =>itemis TResult
The callback performing the check. -
thisArg: TContext
A value to use as context when evaluating items.
Returns: undefined | TResult
Returns the last item for which the provided predicate evaluates to true; otherwise undefined.