Add List splice method to API docs

It was mysteriously missing!
This commit is contained in:
Scott Kyle 2016-03-17 14:49:12 -07:00
parent 301214dd39
commit 933326c410
1 changed files with 13 additions and 1 deletions

View File

@ -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 objects type must match * @param {...Realm.Object} object - Each objects type must match