Better type definition
Fixes the `Invalid type(s) for operator IN.` warnings from the closure compiler.
This commit is contained in:
@@ -61,13 +61,13 @@ const TileImage = function(options) {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {Object.<string, ol.TileCache>}
|
||||
* @type {!Object.<string, ol.TileCache>}
|
||||
*/
|
||||
this.tileCacheForProjection = {};
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {Object.<string, ol.tilegrid.TileGrid>}
|
||||
* @type {!Object.<string, ol.tilegrid.TileGrid>}
|
||||
*/
|
||||
this.tileGridForProjection = {};
|
||||
|
||||
@@ -173,8 +173,7 @@ TileImage.prototype.getTileGridForProjection = function(projection) {
|
||||
} else {
|
||||
const projKey = getUid(projection).toString();
|
||||
if (!(projKey in this.tileGridForProjection)) {
|
||||
this.tileGridForProjection[projKey] =
|
||||
getTileGridForProjection(projection);
|
||||
this.tileGridForProjection[projKey] = getTileGridForProjection(projection);
|
||||
}
|
||||
return /** @type {!ol.tilegrid.TileGrid} */ (this.tileGridForProjection[projKey]);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ const UrlTile = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Object.<number, boolean>}
|
||||
* @type {!Object.<number, boolean>}
|
||||
*/
|
||||
this.tileLoadingKeys_ = {};
|
||||
|
||||
|
||||
@@ -126,21 +126,21 @@ const VectorSource = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Object.<string, ol.Feature>}
|
||||
* @type {!Object.<string, ol.Feature>}
|
||||
*/
|
||||
this.nullGeometryFeatures_ = {};
|
||||
|
||||
/**
|
||||
* A lookup of features by id (the return from feature.getId()).
|
||||
* @private
|
||||
* @type {Object.<string, ol.Feature>}
|
||||
* @type {!Object.<string, ol.Feature>}
|
||||
*/
|
||||
this.idIndex_ = {};
|
||||
|
||||
/**
|
||||
* A lookup of features without id (keyed by ol.getUid(feature)).
|
||||
* @private
|
||||
* @type {Object.<string, ol.Feature>}
|
||||
* @type {!Object.<string, ol.Feature>}
|
||||
*/
|
||||
this.undefIdIndex_ = {};
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ WMTS.prototype.updateDimensions = function(dimensions) {
|
||||
/**
|
||||
* Generate source options from a capabilities object.
|
||||
* @param {Object} wmtsCap An object representing the capabilities document.
|
||||
* @param {Object} config Configuration properties for the layer. Defaults for
|
||||
* @param {!Object} config Configuration properties for the layer. Defaults for
|
||||
* the layer will apply if not provided.
|
||||
*
|
||||
* Required config properties:
|
||||
|
||||
Reference in New Issue
Block a user