Improve ol.Collection documentation
This commit is contained in:
@@ -192,8 +192,9 @@ ol.Collection.prototype.insertAt = function(index, elem) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the last element of the collection.
|
* Remove the last element of the collection and return it.
|
||||||
* @return {T} Element.
|
* Return `undefined` if the collection is empty.
|
||||||
|
* @return {T|undefined} Element.
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.Collection.prototype.pop = function() {
|
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.
|
* @param {number} index Index.
|
||||||
* @return {T} Value.
|
* @return {T|undefined} Value.
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.Collection.prototype.removeAt = function(index) {
|
ol.Collection.prototype.removeAt = function(index) {
|
||||||
|
|||||||
Reference in New Issue
Block a user