Improve ol.Collection documentation

This commit is contained in:
Frederic Junod
2014-08-28 17:33:14 +02:00
parent 41ee554969
commit aa40504dd5

View File

@@ -192,8 +192,9 @@ ol.Collection.prototype.insertAt = function(index, elem) {
/**
* Remove the last element of the collection.
* @return {T} Element.
* Remove the last element of the collection and return it.
* Return `undefined` if the collection is empty.
* @return {T|undefined} Element.
* @api stable
*/
ol.Collection.prototype.pop = function() {
@@ -233,9 +234,10 @@ ol.Collection.prototype.remove = function(elem) {
/**
* Remove the element at the provided index.
* Remove the element at the provided index and return it.
* Return `undefined` if the collection does not contain this index.
* @param {number} index Index.
* @return {T} Value.
* @return {T|undefined} Value.
* @api stable
*/
ol.Collection.prototype.removeAt = function(index) {