Skip to content

IReadOnlyObservableCollection.findLast

github-actions[bot] edited this page Nov 17, 2024 · 2 revisions

This method has multiple overloads.


Returns the last item that satisfies the given condition.

findLast<TContext>(
  predicate: (this: TContext, item: TItem, index: number, collection: this) => boolean,
  thisArg?: TContext
): undefined | TItem

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

Generic Parameters

  • TContext - The context type in which the callback is executed.

Parameters

  • 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.

See also


Returns the last item that satisfies the given condition.

findLast<TResult, TContext>(
  predicate: (this: TContext, item: TItem, index: number, collection: this) => item is TResult,
  thisArg?: TContext
): undefined | TResult

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

Generic Parameters

  • TResult - The type of item to return.

  • TContext - The context type in which the callback is executed.

Parameters

  • predicate: (this:TContext, item:TItem, index:number, collection:this) => item is 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.

See also

Clone this wiki locally