A signal emitted when the list has changed.
The number of items in the list.
This is a read-only property.
Add an item to the end of the list.
The item to add to the list.
The index at which the item was added.
Replace the contents of the list with the specified items.
The items to assign to the list.
An array of the previous list items.
This is equivalent to list.replace(0, list.length, items)
.
Remove all items from the list.
An array of the items removed from the list.
This is equivalent to list.replace(0, list.length, [])
.
Test whether the list contains a specific item.
The item of interest.
true
if the list contains the item, false
otherwise.
Get the item at a specific index in the list.
The index of the item of interest. If this is negative, it is offset from the end of the list.
The item at the specified index, or undefined
if the
index is out of range.
Get the index of the first occurence of an item in the list.
The item of interest.
The index of the specified item or -1
if the item is
not contained in the list.
Insert an item into the list at a specific index.
The index at which to insert the item. If this is negative, it is offset from the end of the list. In all cases, it is clamped to the bounds of the list.
The item to insert into the list.
The index at which the item was inserted.
Move an item from one index to another.
The index of the item of interest. If this is negative, it is offset from the end of the list.
The desired index for the item. If this is negative, it is offset from the end of the list.
true
if the item was moved, false
otherwise.
Remove the first occurrence of a specific item from the list.
The item to remove from the list.
The index occupied by the item, or -1
if the item is
not contained in the list.
Remove the item at a specific index.
The index of the item of interest. If this is negative, it is offset from the end of the list.
The item at the specified index, or undefined
if the
index is out of range.
Replace items at a specific location in the list.
The index at which to modify the list. If this is negative, it is offset from the end of the list. In all cases, it is clamped to the bounds of the list.
The number of items to remove at the given index. This is clamped to the length of the list.
The items to insert at the specified index.
An array of the items removed from the list.
Set the item at a specific index.
The index of interest. If this is negative, it is offset from the end of the list.
The item to set at the index.
The item which occupied the index, or undefined
if the
index is out of range.
Get a shallow copy of a portion of the list.
The start index of the slice, inclusive. If this is
negative, it is offset from the end of the list. If this is not
provided, it defaults to 0
. In all cases, it is clamped to the
bounds of the list.
The end index of the slice, exclusive. If this is
negative, it is offset from the end of the list. If this is not
provided, it defaults to length
. In all cases, it is clamped
to the bounds of the list.
A new array containing the specified range of items.
Generated using TypeDoc
A sequence container which can be observed for changes.