diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index 28ad2b1f66..51a5853c97 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -539,8 +539,7 @@ class PluggableMap extends BaseObject { return; } const coordinate = this.getCoordinateFromPixelInternal(pixel); - opt_options = opt_options !== undefined ? opt_options : - /** @type {AtPixelOptions} */ ({}); + opt_options = opt_options !== undefined ? opt_options : {}; const hitTolerance = opt_options.hitTolerance !== undefined ? opt_options.hitTolerance * this.frameState_.pixelRatio : 0; const layerFilter = opt_options.layerFilter !== undefined ? @@ -592,7 +591,7 @@ class PluggableMap extends BaseObject { if (!this.frameState_) { return; } - const options = opt_options || /** @type {AtPixelOptions} */ ({}); + const options = opt_options || {}; const hitTolerance = options.hitTolerance !== undefined ? options.hitTolerance * this.frameState_.pixelRatio : 0; const layerFilter = options.layerFilter || TRUE; @@ -612,8 +611,7 @@ class PluggableMap extends BaseObject { return false; } const coordinate = this.getCoordinateFromPixelInternal(pixel); - opt_options = opt_options !== undefined ? opt_options : - /** @type {AtPixelOptions} */ ({}); + opt_options = opt_options !== undefined ? opt_options : {}; const layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE; const hitTolerance = opt_options.hitTolerance !== undefined ? opt_options.hitTolerance * this.frameState_.pixelRatio : 0; diff --git a/src/ol/control/ScaleLine.js b/src/ol/control/ScaleLine.js index 16a9ce7739..45c8ad3ff7 100644 --- a/src/ol/control/ScaleLine.js +++ b/src/ol/control/ScaleLine.js @@ -126,7 +126,7 @@ class ScaleLine extends Control { this.addEventListener(getChangeEventType(UNITS_PROP), this.handleUnitsChanged_); - this.setUnits(/** @type {Units} */ (options.units) || Units.METRIC); + this.setUnits(options.units || Units.METRIC); /** * @private diff --git a/src/ol/size.js b/src/ol/size.js index 0ad9bef904..f6b73975f0 100644 --- a/src/ol/size.js +++ b/src/ol/size.js @@ -70,7 +70,7 @@ export function toSize(size, opt_size) { if (opt_size === undefined) { opt_size = [size, size]; } else { - opt_size[0] = opt_size[1] = /** @type {number} */ (size); + opt_size[0] = opt_size[1] = size; } return opt_size; } diff --git a/src/ol/style/RegularShape.js b/src/ol/style/RegularShape.js index bdf6b89d82..b313c07ab7 100644 --- a/src/ol/style/RegularShape.js +++ b/src/ol/style/RegularShape.js @@ -98,8 +98,7 @@ class RegularShape extends ImageStyle { * @protected * @type {number} */ - this.radius_ = /** @type {number} */ (options.radius !== undefined ? - options.radius : options.radius1); + this.radius_ = options.radius !== undefined ? options.radius : options.radius1; /** * @private diff --git a/src/ol/tilegrid.js b/src/ol/tilegrid.js index 68786a3c1d..94fa003229 100644 --- a/src/ol/tilegrid.js +++ b/src/ol/tilegrid.js @@ -88,12 +88,10 @@ export function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) { * @api */ export function createXYZ(opt_options) { - /** @type {XYZOptions} */ const xyzOptions = opt_options || {}; const extent = xyzOptions.extent || getProjection('EPSG:3857').getExtent(); - /** @type {import("./tilegrid/TileGrid.js").Options} */ const gridOptions = { extent: extent, minZoom: xyzOptions.minZoom,