More precise {function} jsdoc definition
This commit is contained in:
@@ -112,11 +112,11 @@ ol.Collection.prototype.extend = function(arr) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Iterate over each element, calling the provided callback.
|
* Iterate over each element, calling the provided callback.
|
||||||
* @param {Function} f The function to call for every element. This function
|
* @param {function(this: S, T, number, Array.<T>): ?} f The function to call
|
||||||
* takes 3 arguments (the element, the index and the array). The return
|
* for every element. This function takes 3 arguments (the element, the
|
||||||
* value is ignored.
|
* index and the array). The return value is ignored.
|
||||||
* @param {Object=} opt_obj The object to be used as the value of 'this'
|
* @param {S=} opt_obj The object to be used as the value of 'this' within f.
|
||||||
* within f.
|
* @template T,S
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.Collection.prototype.forEach = function(f, opt_obj) {
|
ol.Collection.prototype.forEach = function(f, opt_obj) {
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ ol.Object.prototype.notifyInternal_ = function(key) {
|
|||||||
/**
|
/**
|
||||||
* Listen for a certain type of event.
|
* Listen for a certain type of event.
|
||||||
* @param {string|Array.<string>} type The event type or array of event types.
|
* @param {string|Array.<string>} type The event type or array of event types.
|
||||||
* @param {Function} listener The listener function.
|
* @param {function(?): ?} listener The listener function.
|
||||||
* @param {Object=} opt_scope Object is whose scope to call
|
* @param {Object=} opt_scope Object is whose scope to call
|
||||||
* the listener.
|
* the listener.
|
||||||
* @return {goog.events.Key} Unique key for the listener.
|
* @return {goog.events.Key} Unique key for the listener.
|
||||||
@@ -265,7 +265,7 @@ ol.Object.prototype.on = function(type, listener, opt_scope) {
|
|||||||
/**
|
/**
|
||||||
* Listen once for a certain type of event.
|
* Listen once for a certain type of event.
|
||||||
* @param {string|Array.<string>} type The event type or array of event types.
|
* @param {string|Array.<string>} type The event type or array of event types.
|
||||||
* @param {Function} listener The listener function.
|
* @param {function(?): ?} listener The listener function.
|
||||||
* @param {Object=} opt_scope Object is whose scope to call
|
* @param {Object=} opt_scope Object is whose scope to call
|
||||||
* the listener.
|
* the listener.
|
||||||
* @return {goog.events.Key} Unique key for the listener.
|
* @return {goog.events.Key} Unique key for the listener.
|
||||||
@@ -343,7 +343,7 @@ ol.Object.prototype.unbind = function(key) {
|
|||||||
/**
|
/**
|
||||||
* Unlisten for a certain type of event.
|
* Unlisten for a certain type of event.
|
||||||
* @param {string|Array.<string>} type The event type or array of event types.
|
* @param {string|Array.<string>} type The event type or array of event types.
|
||||||
* @param {Function} listener The listener function.
|
* @param {function(?): ?} listener The listener function.
|
||||||
* @param {Object=} opt_scope Object is whose scope to call
|
* @param {Object=} opt_scope Object is whose scope to call
|
||||||
* the listener.
|
* the listener.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
@@ -354,9 +354,9 @@ ol.Object.prototype.un = function(type, listener, opt_scope) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes an event listener which was added with listen() by the key returned
|
* Removes an event listener which was added with `listen()` by the key returned
|
||||||
* by on().
|
* by `on()` or `once()`.
|
||||||
* @param {?number} key Key.
|
* @param {goog.events.Key} key Key.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.Object.prototype.unByKey = function(key) {
|
ol.Object.prototype.unByKey = function(key) {
|
||||||
|
|||||||
@@ -96,8 +96,12 @@ ol.structs.LRUCache.prototype.containsKey = function(key) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Function} f Function.
|
* @param {function(this: S, *, string, ol.structs.LRUCache): ?} f The function
|
||||||
* @param {Object=} opt_obj Object.
|
* to call for every entry from the oldest to the newer. This function takes
|
||||||
|
* 3 arguments (the entry value, the entry key and the LRUCache object).
|
||||||
|
* The return value is ignored.
|
||||||
|
* @param {S=} opt_obj The object to be used as the value of 'this' within f.
|
||||||
|
* @template S
|
||||||
*/
|
*/
|
||||||
ol.structs.LRUCache.prototype.forEach = function(f, opt_obj) {
|
ol.structs.LRUCache.prototype.forEach = function(f, opt_obj) {
|
||||||
var entry = this.oldest_;
|
var entry = this.oldest_;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ ol.TilePriorityFunction;
|
|||||||
* @extends {ol.structs.PriorityQueue}
|
* @extends {ol.structs.PriorityQueue}
|
||||||
* @param {ol.TilePriorityFunction} tilePriorityFunction
|
* @param {ol.TilePriorityFunction} tilePriorityFunction
|
||||||
* Tile priority function.
|
* Tile priority function.
|
||||||
* @param {Function} tileChangeCallback
|
* @param {function(): ?} tileChangeCallback
|
||||||
* Function called on each tile change event.
|
* Function called on each tile change event.
|
||||||
*/
|
*/
|
||||||
ol.TileQueue = function(tilePriorityFunction, tileChangeCallback) {
|
ol.TileQueue = function(tilePriorityFunction, tileChangeCallback) {
|
||||||
@@ -44,7 +44,7 @@ ol.TileQueue = function(tilePriorityFunction, tileChangeCallback) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {Function}
|
* @type {function(): ?}
|
||||||
*/
|
*/
|
||||||
this.tileChangeCallback_ = tileChangeCallback;
|
this.tileChangeCallback_ = tileChangeCallback;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user