Skip to content

IReadOnlyObservableCollection.toSorted

github-actions[bot] edited this page Feb 4, 2025 · 4 revisions

Returns a JavaScript Array containing the items of the collection in ascending order.

toSorted(
  compareCallback?: (a: Exclude<TItem, undefined>, b: Exclude<TItem, undefined>) => number
): TItem[]

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

Parameters

Returns: TItem[]

A new Array containing the elements sorted in ascending order.

See also

Clone this wiki locally