Skip to content

IObservableCollection.shift

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

Removes the first element from the collection and returns it. If the collection is empty, undefined is returned.

shift(): undefined | TItem

Source reference: src/collections/observableCollections/IObservableCollection.ts:43.

Returns: undefined | TItem

The first element in the collection that was removed.

See also

Clone this wiki locally