Index: third_party/google_input_tools/third_party/closure_library/closure/goog/structs/structs.js |
diff --git a/third_party/google_input_tools/third_party/closure_library/closure/goog/structs/structs.js b/third_party/google_input_tools/third_party/closure_library/closure/goog/structs/structs.js |
index edf93598bfb60a4d42856b10299976a890fe4f62..2744f6f5e2ec276c49f3c03a1b37239382801fb3 100644 |
--- a/third_party/google_input_tools/third_party/closure_library/closure/goog/structs/structs.js |
+++ b/third_party/google_input_tools/third_party/closure_library/closure/goog/structs/structs.js |
@@ -52,7 +52,7 @@ goog.structs.getCount = function(col) { |
/** |
* Returns the values of the collection-like object. |
* @param {Object} col The collection-like object. |
- * @return {!Array} The values in the collection-like object. |
+ * @return {!Array<?>} The values in the collection-like object. |
*/ |
goog.structs.getValues = function(col) { |
if (typeof col.getValues == 'function') { |
@@ -115,7 +115,7 @@ goog.structs.contains = function(col, val) { |
return col.containsValue(val); |
} |
if (goog.isArrayLike(col) || goog.isString(col)) { |
- return goog.array.contains(/** @type {Array} */ (col), val); |
+ return goog.array.contains(/** @type {!Array<?>} */ (col), val); |
} |
return goog.object.containsValue(col, val); |
}; |
@@ -131,11 +131,11 @@ goog.structs.isEmpty = function(col) { |
return col.isEmpty(); |
} |
- // We do not use goog.string.isEmpty because here we treat the string as |
+ // We do not use goog.string.isEmptyOrWhitespace because here we treat the string as |
// collection and as such even whitespace matters |
if (goog.isArrayLike(col) || goog.isString(col)) { |
- return goog.array.isEmpty(/** @type {Array} */ (col)); |
+ return goog.array.isEmpty(/** @type {!Array<?>} */ (col)); |
} |
return goog.object.isEmpty(col); |
}; |
@@ -177,7 +177,7 @@ goog.structs.forEach = function(col, f, opt_obj) { |
if (typeof col.forEach == 'function') { |
col.forEach(f, opt_obj); |
} else if (goog.isArrayLike(col) || goog.isString(col)) { |
- goog.array.forEach(/** @type {Array} */ (col), f, opt_obj); |
+ goog.array.forEach(/** @type {!Array<?>} */ (col), f, opt_obj); |
} else { |
var keys = goog.structs.getKeys(col); |
var values = goog.structs.getValues(col); |
@@ -202,7 +202,7 @@ goog.structs.forEach = function(col, f, opt_obj) { |
* is false the value is not included. |
* @param {T=} opt_obj The object to be used as the value of 'this' |
* within {@code f}. |
- * @return {!Object|!Array} A new collection where the passed values are |
+ * @return {!Object|!Array<?>} A new collection where the passed values are |
* present. If col is a key-less collection an array is returned. If col |
* has keys and values a plain old JS object is returned. |
* @template T,S |
@@ -212,7 +212,7 @@ goog.structs.filter = function(col, f, opt_obj) { |
return col.filter(f, opt_obj); |
} |
if (goog.isArrayLike(col) || goog.isString(col)) { |
- return goog.array.filter(/** @type {!Array} */ (col), f, opt_obj); |
+ return goog.array.filter(/** @type {!Array<?>} */ (col), f, opt_obj); |
} |
var rv; |
@@ -252,7 +252,7 @@ goog.structs.filter = function(col, f, opt_obj) { |
* something. The result will be used as the value in the new collection. |
* @param {T=} opt_obj The object to be used as the value of 'this' |
* within {@code f}. |
- * @return {!Object.<V>|!Array.<V>} A new collection with the new values. If |
+ * @return {!Object<V>|!Array<V>} A new collection with the new values. If |
* col is a key-less collection an array is returned. If col has keys and |
* values a plain old JS object is returned. |
* @template T,S,V |
@@ -262,7 +262,7 @@ goog.structs.map = function(col, f, opt_obj) { |
return col.map(f, opt_obj); |
} |
if (goog.isArrayLike(col) || goog.isString(col)) { |
- return goog.array.map(/** @type {!Array} */ (col), f, opt_obj); |
+ return goog.array.map(/** @type {!Array<?>} */ (col), f, opt_obj); |
} |
var rv; |
@@ -306,7 +306,7 @@ goog.structs.some = function(col, f, opt_obj) { |
return col.some(f, opt_obj); |
} |
if (goog.isArrayLike(col) || goog.isString(col)) { |
- return goog.array.some(/** @type {!Array} */ (col), f, opt_obj); |
+ return goog.array.some(/** @type {!Array<?>} */ (col), f, opt_obj); |
} |
var keys = goog.structs.getKeys(col); |
var values = goog.structs.getValues(col); |
@@ -340,7 +340,7 @@ goog.structs.every = function(col, f, opt_obj) { |
return col.every(f, opt_obj); |
} |
if (goog.isArrayLike(col) || goog.isString(col)) { |
- return goog.array.every(/** @type {!Array} */ (col), f, opt_obj); |
+ return goog.array.every(/** @type {!Array<?>} */ (col), f, opt_obj); |
} |
var keys = goog.structs.getKeys(col); |
var values = goog.structs.getValues(col); |