Better type definition

Fixes the `Invalid type(s) for operator IN.` warnings from the closure compiler.
This commit is contained in:
Frederic Junod
2018-03-07 15:51:10 +01:00
parent 21bf83537d
commit 3435ac575e
29 changed files with 72 additions and 103 deletions

View File

@@ -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]);
}