Add List splice method to API docs
It was mysteriously missing!
This commit is contained in:
parent
301214dd39
commit
933326c410
14
docs/list.js
14
docs/list.js
|
@ -16,7 +16,6 @@
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instances of this class will be returned when accessing object properties whose type is `"list"`
|
* Instances of this class will be returned when accessing object properties whose type is `"list"`
|
||||||
* (see {@linkplain Realm~ObjectSchemaProperty ObjectSchemaProperty}).
|
* (see {@linkplain Realm~ObjectSchemaProperty ObjectSchemaProperty}).
|
||||||
|
@ -89,6 +88,19 @@ class List {
|
||||||
*/
|
*/
|
||||||
push(...object) {}
|
push(...object) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Changes the contents of the list by removing objects and/or inserting new objects.
|
||||||
|
* @see {@linkcode https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice Array.prototype.splice}
|
||||||
|
* @param {number} index - The start index. If greater than the length of the list,
|
||||||
|
* the start index will be set to the length instead. If negative, then the start index
|
||||||
|
* will be counted from the end of the list (e.g. `list.length - index`).
|
||||||
|
* @param {number} [count=length - start] - The number of objects to remove from the list.
|
||||||
|
* @param {...Realm.Object} [object] - Objects to insert into the list starting at `index`.
|
||||||
|
* @returns {Realm.Object[]} containing the objects that were removed from the list. The
|
||||||
|
* array is empty if no objects were removed.
|
||||||
|
*/
|
||||||
|
splice(index, count, ...object) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add one or more objects to the _beginning_ of the list.
|
* Add one or more objects to the _beginning_ of the list.
|
||||||
* @param {...Realm.Object} object - Each object’s type must match
|
* @param {...Realm.Object} object - Each object’s type must match
|
||||||
|
|
Loading…
Reference in New Issue