Skip to content

ReadOnlyObservableCollection.some

Andrei Fangli edited this page Sep 3, 2023 · 2 revisions

Checks whether some elements in the collection fulfil a given condition.

This is a public method.

public some(predicate: (item: TItem, index: number, collection: IReadOnlyObservableCollection<TItem>) => boolean): boolean;

Parameters

  • predicate: Function, the callback performing the check for each item.

    Parameters:

    Returns: Boolean

    Returns true if the provided item satisfies the condition; false otherwise.

Returns: Boolean

Returns true if the provided predicate is true for at least one item; otherwise false.

See


Checks whether some elements in the collection fulfil a given condition.

some<TContext>(predicate: (this: TContext, item: TItem, index: number, collection: IReadOnlyObservableCollection<TItem>) => boolean, thisArg: TContext): boolean;

Template Parameters

  • TContext: the context type in which the callback is executed.

Parameters

  • predicate: Function, the callback performing the check for each item.

    Parameters:

    Returns: Boolean

    Returns true if the provided item satisfies the condition; false otherwise.
  • thisArg: TContext, a value to use as context when checking items.

Returns: Boolean

Returns true if the provided predicate is true for at least one item; otherwise false.

See

Clone this wiki locally