Add @struct annotation where possible

This commit is contained in:
Tom Payne
2013-12-04 15:44:03 +01:00
parent aa0a02b935
commit 600cb3a0ff
21 changed files with 37 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ ol.BUFFER_REPLACE_UNUSED_ENTRIES_WITH_NANS = goog.DEBUG;
* @param {Array.<number>=} opt_arr Array.
* @param {number=} opt_used Used.
* @param {number=} opt_usage Usage.
* @struct
* @todo stability experimental
*/
ol.structs.Buffer = function(opt_arr, opt_used, opt_usage) {

View File

@@ -9,6 +9,7 @@ goog.require('goog.asserts');
* This implementation is designed for the case when the number of distinct
* integer ranges is small.
* @constructor
* @struct
* @param {Array.<number>=} opt_arr Array.
*/
ol.structs.IntegerSet = function(opt_arr) {

View File

@@ -10,6 +10,7 @@ goog.require('goog.object');
* Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring
* items from the cache is the responsibility of the user.
* @constructor
* @struct
* @template T
*/
ol.structs.LRUCache = function() {

View File

@@ -17,6 +17,7 @@ goog.require('goog.object');
* @constructor
* @param {function(T): number} priorityFunction Priority function.
* @param {function(T): string} keyFunction Key function.
* @struct
* @template T
*/
ol.structs.PriorityQueue = function(priorityFunction, keyFunction) {

View File

@@ -36,6 +36,7 @@ goog.require('ol.extent');
* @param {number} height Height.
* @param {Array.<ol.structs.RBushNode.<T>>} children Children.
* @param {?T} value Value.
* @struct
* @template T
*/
ol.structs.RBushNode = function(extent, height, children, value) {
@@ -160,6 +161,7 @@ ol.structs.RBushNode.prototype.isLeaf = function() {
* @constructor
* @param {number=} opt_maxEntries Max entries.
* @see https://github.com/mourner/rbush
* @struct
* @template T
*/
ol.structs.RBush = function(opt_maxEntries) {