@google/earthengine 1.7.20 → 1.7.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google/earthengine",
3
- "version": "1.7.20",
3
+ "version": "1.7.22",
4
4
  "description": "JavaScript client for Google Earth Engine API.",
5
5
  "author": "Google LLC",
6
6
  "license": "Apache-2.0",
package/src/apiclient.js CHANGED
@@ -24,7 +24,7 @@ const {trustedResourceUrl} = goog.require('safevalues.index');
24
24
  /** @namespace */
25
25
  const apiclient = {};
26
26
 
27
- const API_CLIENT_VERSION = '1.7.20';
27
+ const API_CLIENT_VERSION = '1.7.22';
28
28
 
29
29
  exports.VERSION = apiVersion.VERSION;
30
30
  exports.API_CLIENT_VERSION = API_CLIENT_VERSION;
package/src/dictionary.js CHANGED
@@ -90,13 +90,14 @@ ee.Dictionary.reset = function() {
90
90
  /**
91
91
  * @override
92
92
  * @param {function(*):*} encoder
93
- * @return {*}
93
+ * @return {!Object}
94
94
  */
95
95
  ee.Dictionary.prototype.encode = function(encoder) {
96
96
  if (this.dict_ !== null) {
97
- return encoder(this.dict_);
97
+ return /** @type {!Object} */ (encoder(this.dict_));
98
98
  } else {
99
- return ee.Dictionary.base(this, 'encode', encoder);
99
+ return /** @type {!Object} */ (
100
+ ee.Dictionary.base(this, 'encode', encoder));
100
101
  }
101
102
  };
102
103
 
@@ -27,8 +27,8 @@ goog.require('goog.array');
27
27
  * - A GeoJSON FeatureCollection
28
28
  * - A computed object: reinterpreted as a collection.
29
29
  *
30
- * @param {string|number|Array.<*>|ee.ComputedObject|
31
- * ee.Geometry|ee.Feature|ee.FeatureCollection} args
30
+ * @param {string|number|!Array.<*>|!ee.ComputedObject|
31
+ * !ee.Geometry|!ee.Feature|!ee.FeatureCollection|!ee.List} args
32
32
  * The constructor arguments.
33
33
  * @param {string=} opt_column The name of the geometry column to use. Only
34
34
  * useful when working with a named collection.
@@ -64,7 +64,7 @@ ee.FeatureCollection = function(args, opt_column) {
64
64
 
65
65
  if (ee.Types.isString(args)) {
66
66
  // An ID.
67
- var actualArgs = {'tableId': args};
67
+ const actualArgs = {'tableId': args};
68
68
  if (opt_column) {
69
69
  actualArgs['geometryColumn'] = opt_column;
70
70
  }
@@ -186,12 +186,12 @@ ee.FeatureCollection.prototype.getMap = ee.FeatureCollection.prototype.getMapId;
186
186
  * An imperative function that returns all the known information about this
187
187
  * collection via an AJAX call.
188
188
  *
189
- * @param {function(ee.data.FeatureCollectionDescription, string=)=}
189
+ * @param {function(!ee.data.FeatureCollectionDescription, string=)=}
190
190
  * opt_callback An optional callback. If not supplied, the call is made
191
191
  * synchronously. If supplied, will be called with the first parameter if
192
192
  * successful and the second if unsuccessful.
193
- * @return {ee.data.FeatureCollectionDescription} A collection description
194
- * whose fields include:
193
+ * @return {!ee.data.FeatureCollectionDescription|undefined} A collection
194
+ * description whose fields include:
195
195
  * - features: a list containing metadata about the features in the
196
196
  * collection.
197
197
  * - properties: an optional dictionary containing the collection's
@@ -200,7 +200,7 @@ ee.FeatureCollection.prototype.getMap = ee.FeatureCollection.prototype.getMapId;
200
200
  * @override
201
201
  */
202
202
  ee.FeatureCollection.prototype.getInfo = function(opt_callback) {
203
- return /** @type {ee.data.FeatureCollectionDescription} */(
203
+ return /** @type {!ee.data.FeatureCollectionDescription|undefined} */ (
204
204
  ee.FeatureCollection.base(this, 'getInfo', opt_callback));
205
205
  };
206
206
 
@@ -273,13 +273,13 @@ ee.FeatureCollection.prototype.select = function(
273
273
  propertySelectors, opt_newProperties, opt_retainGeometry) {
274
274
  if (ee.Types.isString(propertySelectors)) {
275
275
  // Varargs.
276
- var varargs = Array.prototype.slice.call(arguments);
276
+ const varargs = Array.prototype.slice.call(arguments);
277
277
  return /** @type {!ee.FeatureCollection} */ (this.map(function(feature) {
278
278
  return /** @type {!ee.Feature} */(feature).select(varargs);
279
279
  }));
280
280
  } else {
281
281
  // Translate the argument names.
282
- var args = ee.arguments.extractFromFunction(
282
+ const args = ee.arguments.extractFromFunction(
283
283
  ee.FeatureCollection.prototype.select, arguments);
284
284
  return /** @type {!ee.FeatureCollection} */ (this.map(function(feature) {
285
285
  return /** @type {!ee.Feature} */(feature).select(args);
@@ -288,13 +288,20 @@ ee.FeatureCollection.prototype.select = function(
288
288
  };
289
289
 
290
290
 
291
- /** @override */
291
+ /**
292
+ * @return {string}
293
+ * @override
294
+ */
292
295
  ee.FeatureCollection.prototype.name = function() {
293
296
  return 'FeatureCollection';
294
297
  };
295
298
 
296
299
 
297
- /** @override */
300
+ /**
301
+ * @return {typeof ee.Feature}
302
+ * @protected
303
+ * @override
304
+ */
298
305
  ee.FeatureCollection.prototype.elementType = function() {
299
306
  return ee.Feature;
300
307
  };
package/src/filter.js CHANGED
@@ -26,7 +26,7 @@ goog.requireType('ee.FeatureCollection');
26
26
  * - A ComputedObject returning a filter. Users shouldn't be making these;
27
27
  * they're produced by the generator functions below.
28
28
  *
29
- * @param {ee.Filter|Array.<*>|Object=} opt_filter Optional filter to add.
29
+ * @param {!ee.Filter|!Array.<*>|!Object=} opt_filter Optional filter to add.
30
30
  * @constructor
31
31
  * @extends {ee.ComputedObject}
32
32
  * @export
@@ -46,7 +46,7 @@ ee.Filter = function(opt_filter) {
46
46
  * The internal rerpresentation of this filter. This is
47
47
  * a list of filter objects which are implicitly ANDed together.
48
48
  *
49
- * @type {Array.<*>}
49
+ * @type {!Array.<*>}
50
50
  * @private
51
51
  */
52
52
  this.filter_;
@@ -108,7 +108,7 @@ ee.Filter.reset = function() {
108
108
  * A map from the deprecated old-style comparison operator names to API
109
109
  * function names, implicitly prefixed with "Filter.". Negative operators
110
110
  * (those starting with "not_") are not included.
111
- * @type {Object.<string>}
111
+ * @type {!Object.<string>}
112
112
  * @const
113
113
  * @private
114
114
  */
@@ -125,7 +125,7 @@ ee.Filter.functionNames_ = {
125
125
  /**
126
126
  * Append a predicate to a filter. These are implicitly ANDed.
127
127
  *
128
- * @param {ee.Filter|Array.<ee.Filter|Object>|Object} newFilter The filter
128
+ * @param {!ee.Filter|!Array.<!ee.Filter|!Object>|!Object} newFilter The filter
129
129
  * to append. Possible types are:
130
130
  * - another fully constructed ee.Filter,
131
131
  * - a ComputedObject producing a filter,
@@ -135,7 +135,7 @@ ee.Filter.functionNames_ = {
135
135
  */
136
136
  ee.Filter.prototype.append_ = function(newFilter) {
137
137
  // Make a copy of the previous filter.
138
- var prev = this.filter_.slice(0);
138
+ const prev = this.filter_.slice(0);
139
139
  if (newFilter instanceof ee.Filter) {
140
140
  goog.array.extend(prev, newFilter.filter_);
141
141
  } else if (newFilter instanceof Array) {
@@ -150,11 +150,11 @@ ee.Filter.prototype.append_ = function(newFilter) {
150
150
  /**
151
151
  * Returns the opposite of the input filter, i.e. the resulting filter will
152
152
  * match if and only if the input filter doesn't match.
153
- * @return {ee.Filter} The negated filter.
153
+ * @return {!ee.Filter} The negated filter.
154
154
  * @export
155
155
  */
156
156
  ee.Filter.prototype.not = function() {
157
- return /** @type {ee.Filter} */ (ee.ApiFunction._call('Filter.not', this));
157
+ return /** @type {!ee.Filter} */ (ee.ApiFunction._call('Filter.not', this));
158
158
  };
159
159
 
160
160
 
@@ -163,12 +163,12 @@ ee.Filter.prototype.not = function() {
163
163
  *
164
164
  * @param {string} name The property name to filter on.
165
165
  * @param {*} value The value to compare against.
166
- * @return {ee.Filter} The constructed filter.
166
+ * @return {!ee.Filter} The constructed filter.
167
167
  * @export
168
168
  */
169
169
  ee.Filter.eq = function(name, value) {
170
- var args = ee.arguments.extractFromFunction(ee.Filter.eq, arguments);
171
- return /** @type {ee.Filter} */(
170
+ const args = ee.arguments.extractFromFunction(ee.Filter.eq, arguments);
171
+ return /** @type {!ee.Filter} */(
172
172
  ee.ApiFunction._call('Filter.equals', args['name'], args['value']));
173
173
  };
174
174
 
@@ -178,11 +178,11 @@ ee.Filter.eq = function(name, value) {
178
178
  *
179
179
  * @param {string} name The property name to filter on.
180
180
  * @param {*} value The value to compare against.
181
- * @return {ee.Filter} The constructed filter.
181
+ * @return {!ee.Filter} The constructed filter.
182
182
  * @export
183
183
  */
184
184
  ee.Filter.neq = function(name, value) {
185
- var args = ee.arguments.extractFromFunction(ee.Filter.neq, arguments);
185
+ const args = ee.arguments.extractFromFunction(ee.Filter.neq, arguments);
186
186
  return ee.Filter.eq(args['name'], args['value']).not();
187
187
  };
188
188
 
@@ -192,12 +192,12 @@ ee.Filter.neq = function(name, value) {
192
192
  *
193
193
  * @param {string} name The property name to filter on.
194
194
  * @param {*} value The value to compare against.
195
- * @return {ee.Filter} The constructed filter.
195
+ * @return {!ee.Filter} The constructed filter.
196
196
  * @export
197
197
  */
198
198
  ee.Filter.lt = function(name, value) {
199
- var args = ee.arguments.extractFromFunction(ee.Filter.lt, arguments);
200
- return /** @type {ee.Filter} */(
199
+ const args = ee.arguments.extractFromFunction(ee.Filter.lt, arguments);
200
+ return /** @type {!ee.Filter} */(
201
201
  ee.ApiFunction._call('Filter.lessThan', args['name'], args['value']));
202
202
  };
203
203
 
@@ -207,11 +207,11 @@ ee.Filter.lt = function(name, value) {
207
207
  *
208
208
  * @param {string} name The property name to filter on.
209
209
  * @param {*} value The value to compare against.
210
- * @return {ee.Filter} The constructed filter.
210
+ * @return {!ee.Filter} The constructed filter.
211
211
  * @export
212
212
  */
213
213
  ee.Filter.gte = function(name, value) {
214
- var args = ee.arguments.extractFromFunction(ee.Filter.gte, arguments);
214
+ const args = ee.arguments.extractFromFunction(ee.Filter.gte, arguments);
215
215
  return ee.Filter.lt(args['name'], args['value']).not();
216
216
  };
217
217
 
@@ -221,12 +221,12 @@ ee.Filter.gte = function(name, value) {
221
221
  *
222
222
  * @param {string} name The property name to filter on.
223
223
  * @param {*} value The value to compare against.
224
- * @return {ee.Filter} The constructed filter.
224
+ * @return {!ee.Filter} The constructed filter.
225
225
  * @export
226
226
  */
227
227
  ee.Filter.gt = function(name, value) {
228
- var args = ee.arguments.extractFromFunction(ee.Filter.gt, arguments);
229
- return /** @type {ee.Filter} */(
228
+ const args = ee.arguments.extractFromFunction(ee.Filter.gt, arguments);
229
+ return /** @type {!ee.Filter} */(
230
230
  ee.ApiFunction._call('Filter.greaterThan', args['name'], args['value']));
231
231
  };
232
232
 
@@ -236,11 +236,11 @@ ee.Filter.gt = function(name, value) {
236
236
  *
237
237
  * @param {string} name The property name to filter on.
238
238
  * @param {*} value The value to compare against.
239
- * @return {ee.Filter} The constructed filter.
239
+ * @return {!ee.Filter} The constructed filter.
240
240
  * @export
241
241
  */
242
242
  ee.Filter.lte = function(name, value) {
243
- var args = ee.arguments.extractFromFunction(ee.Filter.lte, arguments);
243
+ const args = ee.arguments.extractFromFunction(ee.Filter.lte, arguments);
244
244
  return ee.Filter.gt(args['name'], args['value']).not();
245
245
  };
246
246
 
@@ -248,26 +248,26 @@ ee.Filter.lte = function(name, value) {
248
248
  /**
249
249
  * Combine two or more filters using boolean AND.
250
250
  *
251
- * @param {...ee.Filter} var_args The filters to combine.
252
- * @return {ee.Filter} The constructed filter.
251
+ * @param {...!ee.Filter} var_args The filters to combine.
252
+ * @return {!ee.Filter} The constructed filter.
253
253
  * @export
254
254
  */
255
255
  ee.Filter.and = function(var_args) {
256
- var args = Array.prototype.slice.call(arguments);
257
- return /** @type {ee.Filter} */(ee.ApiFunction._call('Filter.and', args));
256
+ const args = Array.prototype.slice.call(arguments);
257
+ return /** @type {!ee.Filter} */(ee.ApiFunction._call('Filter.and', args));
258
258
  };
259
259
 
260
260
 
261
261
  /**
262
262
  * Combine two or more filters using boolean OR.
263
263
  *
264
- * @param {...ee.Filter} var_args The filters to combine.
265
- * @return {ee.Filter} The constructed filter.
264
+ * @param {...!ee.Filter} var_args The filters to combine.
265
+ * @return {!ee.Filter} The constructed filter.
266
266
  * @export
267
267
  */
268
268
  ee.Filter.or = function(var_args) {
269
- var args = Array.prototype.slice.call(arguments);
270
- return /** @type {ee.Filter} */(ee.ApiFunction._call('Filter.or', args));
269
+ const args = Array.prototype.slice.call(arguments);
270
+ return /** @type {!ee.Filter} */(ee.ApiFunction._call('Filter.or', args));
271
271
  };
272
272
 
273
273
 
@@ -279,17 +279,17 @@ ee.Filter.or = function(var_args) {
279
279
  * @param {!Date|string|number} start The start date (inclusive).
280
280
  * @param {?Date|string|number=} opt_end The end date (exclusive). Optional. If
281
281
  * not specified, a 1-millisecond range starting at 'start' is created.
282
- * @return {?ee.Filter} The constructed filter.
282
+ * @return {!ee.Filter} The constructed filter.
283
283
  * @export
284
284
  */
285
285
  ee.Filter.date = function(start, opt_end) {
286
- var args = ee.arguments.extractFromFunction(ee.Filter.date, arguments);
287
- var range = ee.ApiFunction._call('DateRange', args['start'], args['end']);
288
- var filter = ee.ApiFunction._apply('Filter.dateRangeContains', {
286
+ const args = ee.arguments.extractFromFunction(ee.Filter.date, arguments);
287
+ const range = ee.ApiFunction._call('DateRange', args['start'], args['end']);
288
+ const filter = ee.ApiFunction._apply('Filter.dateRangeContains', {
289
289
  'leftValue': range,
290
290
  'rightField': 'system:time_start'
291
291
  });
292
- return /** @type {ee.Filter} */ (filter);
292
+ return /** @type {!ee.Filter} */ (filter);
293
293
  };
294
294
 
295
295
 
@@ -298,28 +298,28 @@ ee.Filter.date = function(start, opt_end) {
298
298
  *
299
299
  * @param {string=} opt_leftField A selector for the left operand.
300
300
  * Should not be specified if leftValue is specified.
301
- * @param {Array|Object=} opt_rightValue The value of the right operand.
301
+ * @param {!Array|!Object=} opt_rightValue The value of the right operand.
302
302
  * Should not be specified if rightField is specified.
303
303
  * @param {string=} opt_rightField A selector for the right operand.
304
304
  * Should not be specified if rightValue is specified.
305
- * @param {Array|Object=} opt_leftValue The value of the left operand.
305
+ * @param {!Array|!Object=} opt_leftValue The value of the left operand.
306
306
  * Should not be specified if leftField is specified.
307
- * @return {ee.Filter} The constructed filter.
307
+ * @return {!ee.Filter} The constructed filter.
308
308
  * @export
309
309
  */
310
310
  ee.Filter.inList = function(
311
311
  opt_leftField, opt_rightValue, opt_rightField, opt_leftValue) {
312
- var args = ee.arguments.extractFromFunction(ee.Filter.inList, arguments);
312
+ const args = ee.arguments.extractFromFunction(ee.Filter.inList, arguments);
313
313
  // Implement this in terms of listContains, with the arguments switched.
314
314
  // In listContains the list is on the left side, while in inList it's on
315
315
  // the right.
316
- var filter = ee.ApiFunction._apply('Filter.listContains', {
316
+ const filter = ee.ApiFunction._apply('Filter.listContains', {
317
317
  'leftField': args['rightField'],
318
318
  'rightValue': args['leftValue'],
319
319
  'rightField': args['leftField'],
320
320
  'leftValue': args['rightValue']
321
321
  });
322
- return /** @type {ee.Filter} */ (filter);
322
+ return /** @type {!ee.Filter} */ (filter);
323
323
  };
324
324
 
325
325
 
@@ -351,7 +351,10 @@ ee.Filter.bounds = function(geometry, opt_errorMargin) {
351
351
  };
352
352
 
353
353
 
354
- /** @override */
354
+ /**
355
+ * @return {string}
356
+ * @override
357
+ */
355
358
  ee.Filter.prototype.name = function() {
356
359
  return 'Filter';
357
360
  };
@@ -370,7 +373,7 @@ ee.Filter.prototype.name = function() {
370
373
  * "equals", "less_than", "greater_than", "contains", "begins_with",
371
374
  * "ends_with", or any of these prefixed with "not_".
372
375
  * @param {*} value The value to compare against.
373
- * @return {ee.Filter} The constructed filter.
376
+ * @return {!ee.Filter} The constructed filter.
374
377
  * @export
375
378
  * @deprecated Use ee.Filter.eq(), ee.Filter.gte(), etc.
376
379
  */
@@ -378,7 +381,7 @@ ee.Filter.metadata = function(name, operator, value) {
378
381
  operator = operator.toLowerCase();
379
382
 
380
383
  // Check for negated filters.
381
- var negated = false;
384
+ let negated = false;
382
385
  if (goog.string.startsWith(operator, 'not_')) {
383
386
  negated = true;
384
387
  operator = operator.substring(4);
@@ -388,8 +391,8 @@ ee.Filter.metadata = function(name, operator, value) {
388
391
  if (!(operator in ee.Filter.functionNames_)) {
389
392
  throw Error('Unknown filtering operator: ' + operator);
390
393
  }
391
- var funcName = 'Filter.' + ee.Filter.functionNames_[operator];
392
- var filter = /** @type {ee.Filter} */(
394
+ const funcName = 'Filter.' + ee.Filter.functionNames_[operator];
395
+ const filter = /** @type {!ee.Filter} */(
393
396
  ee.ApiFunction._call(funcName, name, value));
394
397
 
395
398
  return negated ? filter.not() : filter;
package/src/image.js CHANGED
@@ -33,7 +33,7 @@ goog.require('goog.object');
33
33
  * - An ee.Image: returns the argument,
34
34
  * - Nothing: results in an empty transparent image.
35
35
  *
36
- * @param {number|string|Array.<*>|ee.Image|Object=} opt_args
36
+ * @param {number|string|!Array.<*>|!ee.Image|!Object|null=} opt_args
37
37
  * Constructor argument.
38
38
  * @constructor
39
39
  * @extends {ee.Element}
@@ -66,7 +66,7 @@ ee.Image = function(opt_args) {
66
66
  } else if (Array.isArray(opt_args)) {
67
67
  // Make an image out of each element.
68
68
  return ee.Image.combine_(goog.array.map(
69
- /** @type {Array.<*>} */ (opt_args),
69
+ /** @type {!Array.<*>} */ (opt_args),
70
70
  function(elem) {
71
71
  return new ee.Image(/** @type {?} */ (elem));
72
72
  }));
@@ -136,18 +136,19 @@ ee.Image.reset = function() {
136
136
  * An imperative function that returns information about this image via an
137
137
  * AJAX call.
138
138
  *
139
- * @param {function(ee.data.ImageDescription, string=)=} opt_callback
139
+ * @param {function(!ee.data.ImageDescription, string=)=} opt_callback
140
140
  * An optional callback. If not supplied, the call is made synchronously.
141
141
  * If supplied, will be called with the first parameter if successful and
142
142
  * the second if unsuccessful.
143
- * @return {ee.data.ImageDescription} A description of the image. Includes:
143
+ * @return {!ee.data.ImageDescription|undefined} A description of the image, or
144
+ * undefined if a callback is specified. Includes:
144
145
  * - bands - a list containing metadata about the bands in the collection.
145
146
  * - properties - a dictionary containing the image's metadata properties.
146
147
  * @export
147
148
  * @override
148
149
  */
149
150
  ee.Image.prototype.getInfo = function(opt_callback) {
150
- return /** @type {ee.data.ImageDescription} */(
151
+ return /** @type {!ee.data.ImageDescription|undefined} */(
151
152
  ee.Image.base(this, 'getInfo', opt_callback));
152
153
  };
153
154
 
@@ -215,7 +216,7 @@ ee.Image.prototype.getMap = ee.Image.prototype.getMapId;
215
216
  * 10000.
216
217
  *
217
218
  * Use getThumbURL for RGB visualization formats PNG and JPG.
218
- * @param {Object} params An object containing download options with the
219
+ * @param {!Object} params An object containing download options with the
219
220
  * following possible values:
220
221
  * <table>
221
222
  * <tr>
@@ -410,10 +411,10 @@ ee.Image.prototype.getThumbURL = function(params, opt_callback) {
410
411
  * Create a 3-band image specifically for visualization. This uses the first
411
412
  * band in each image.
412
413
  *
413
- * @param {ee.Image} r The red image.
414
- * @param {ee.Image} g The green image.
415
- * @param {ee.Image} b The blue image.
416
- * @return {ee.Image} The combined image.
414
+ * @param {!ee.Image} r The red image.
415
+ * @param {!ee.Image} g The green image.
416
+ * @param {!ee.Image} b The blue image.
417
+ * @return {!ee.Image} The combined image.
417
418
  * @export
418
419
  */
419
420
  ee.Image.rgb = function(r, g, b) {
@@ -435,8 +436,8 @@ ee.Image.rgb = function(r, g, b) {
435
436
  *
436
437
  * This function will promote constant values into constant images.
437
438
  *
438
- * @param {...ee.Image} var_args The images to be combined.
439
- * @return {ee.Image} The combined image.
439
+ * @param {...!ee.Image} var_args The images to be combined.
440
+ * @return {!ee.Image} The combined image.
440
441
  * @export
441
442
  */
442
443
  ee.Image.cat = function(var_args) {
@@ -449,14 +450,14 @@ ee.Image.cat = function(var_args) {
449
450
  * Combine all the bands from the given images into a single image, with
450
451
  * optional renaming.
451
452
  *
452
- * @param {Array.<ee.Image>} images The images to be combined.
453
- * @param {Array.<string>=} opt_names A list of names for the output bands.
454
- * @return {ee.Image} The combined image.
453
+ * @param {!Array.<!ee.Image>} images The images to be combined.
454
+ * @param {?Array.<string>=} opt_names A list of names for the output bands.
455
+ * @return {!ee.Image} The combined image.
455
456
  * @private
456
457
  */
457
458
  ee.Image.combine_ = function(images, opt_names) {
458
459
  if (images.length == 0) {
459
- return /** @type {ee.Image} */ (ee.ApiFunction._call('Image.constant', []));
460
+ return /** @type {!ee.Image} */ (ee.ApiFunction._call('Image.constant', []));
460
461
  }
461
462
 
462
463
  // Append all the bands.
@@ -542,7 +543,7 @@ ee.Image.prototype.select = function(var_args) {
542
543
  * using the '=' operator (e.g.: x = a + b).
543
544
  *
544
545
  * @param {string} expression The expression to evaluate.
545
- * @param {Object.<ee.Image>=} opt_map A map of input images available by name.
546
+ * @param {!Object.<!ee.Image>=} opt_map A map of input images available by name.
546
547
  * @return {!ee.Image} The image computed by the provided expression.
547
548
  * @export
548
549
  */
@@ -580,7 +581,7 @@ ee.Image.prototype.expression = function(expression, opt_map) {
580
581
 
581
582
  /**
582
583
  * @this {ee.Function}
583
- * @return {ee.Function.Signature}
584
+ * @return {!ee.Function.Signature}
584
585
  */
585
586
  func.getSignature = function() {
586
587
  return {
@@ -610,9 +611,9 @@ ee.Image.prototype.expression = function(expression, opt_map) {
610
611
  *
611
612
  * Use clipToCollection to clip an image to a FeatureCollection.
612
613
  *
613
- * @param {ee.Geometry|ee.Feature|Object} geometry
614
+ * @param {!ee.Geometry|!ee.Feature|!Object} geometry
614
615
  * The Geometry or Feature to clip to.
615
- * @return {ee.Image} The clipped image.
616
+ * @return {!ee.Image} The clipped image.
616
617
  * @export
617
618
  */
618
619
  ee.Image.prototype.clip = function(geometry) {
@@ -623,7 +624,7 @@ ee.Image.prototype.clip = function(geometry) {
623
624
  } catch (e) {
624
625
  // Not an ee.Geometry or GeoJSON. Just pass it along.
625
626
  }
626
- return /** @type {ee.Image} */(
627
+ return /** @type {!ee.Image} */(
627
628
  ee.ApiFunction._call('Image.clip', this, geometry));
628
629
  };
629
630
 
@@ -631,9 +632,9 @@ ee.Image.prototype.clip = function(geometry) {
631
632
  /**
632
633
  * Rename the bands of an image.
633
634
  *
634
- * @param {...string|Object|Array<string>} var_args The new names for the bands.
635
+ * @param {...string|!Object|!Array<string>} var_args The new names for the bands.
635
636
  * Must match the number of bands in the Image.
636
- * @return {ee.Image} The renamed image.
637
+ * @return {!ee.Image} The renamed image.
637
638
  * @export
638
639
  */
639
640
  ee.Image.prototype.rename = function(var_args) {
@@ -645,12 +646,15 @@ ee.Image.prototype.rename = function(var_args) {
645
646
  // Varargs list of strings.
646
647
  names = Array.from(arguments);
647
648
  }
648
- return /** @type {ee.Image} */(
649
+ return /** @type {!ee.Image} */(
649
650
  ee.ApiFunction._call('Image.rename', this, names));
650
651
  };
651
652
 
652
653
 
653
- /** @override */
654
+ /**
655
+ * @return {string}
656
+ * @override
657
+ */
654
658
  ee.Image.prototype.name = function() {
655
659
  return 'Image';
656
660
  };
package/src/images.js CHANGED
@@ -344,9 +344,9 @@ ee.data.images.applyVisualization = function(image, params) {
344
344
  * @return {!ee.data.ImageVisualizationParameters} Params for visualize()
345
345
  */
346
346
  ee.data.images.extractVisParams = function(params, outParams) {
347
- var keysToExtract = ["bands", "gain", "bias", "min", "max",
347
+ const keysToExtract = ["bands", "gain", "bias", "min", "max",
348
348
  "gamma", "palette", "opacity", "forceRgbOutput"];
349
- var visParams = {};
349
+ const visParams = {};
350
350
  goog.object.forEach(params, function(value, key) {
351
351
  if (goog.array.contains(keysToExtract, key)) {
352
352
  visParams[key] = value;