insert()
Inserts the provided object into the list, before the specified reference object.
insert(item: T, before?: T): this;
Notes
- If no
beforeargument is specified, the item is added to the end of the list.
Parameters
- item — The object to insert
- before — The reference object, before which to insert the item
Errors
This method throws an error if the item is already in the list. This method throws an error if the item isn’t of the correct type (see restrict()). This method throws an error if the reference object isn’t in the list.
Related
class ObservableList
A data structure that contains an ordered set of observable objects.
