Skip to content

ReadOnlyObservableCollection.with

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

Returns a JavaScript Array containing the elements from the collection and having the one at the provided index replaced with the provided value.

public with(
  index: number,
  item: TItem
): TItem[]

Source reference: src/collections/observableCollections/ReadOnlyObservableCollection.ts:175.

Parameters

  • index: number
    The index at which to set the item in the result array, accepts both positive and negative values.

  • item: TItem
    The item to set in the result array.

Returns: TItem[]

A new Array containing the elements of the collection having the provided value set at the provided index.

See also

Clone this wiki locally