diff --git a/src/ol/Collection.js b/src/ol/Collection.js index 9a4eba9533..fee753d3c1 100644 --- a/src/ol/Collection.js +++ b/src/ol/Collection.js @@ -145,7 +145,7 @@ Collection.prototype.item = function(index) { * @api */ Collection.prototype.getLength = function() { - return (/** @type {number} */ this.get(Property.LENGTH)); + return /** @type {number} */ (this.get(Property.LENGTH)); }; diff --git a/src/ol/Geolocation.js b/src/ol/Geolocation.js index d9fac464e7..c3a0671983 100644 --- a/src/ol/Geolocation.js +++ b/src/ol/Geolocation.js @@ -197,9 +197,7 @@ Geolocation.prototype.positionError_ = function(error) { * @api */ Geolocation.prototype.getAccuracy = function() { - return ( - /** @type {number|undefined} */ this.get(GeolocationProperty.ACCURACY) - ); + return /** @type {number|undefined} */ (this.get(GeolocationProperty.ACCURACY)); }; @@ -210,9 +208,7 @@ Geolocation.prototype.getAccuracy = function() { * @api */ Geolocation.prototype.getAccuracyGeometry = function() { - return ( - /** @type {?ol.geom.Polygon} */ this.get(GeolocationProperty.ACCURACY_GEOMETRY) || null - ); + return /** @type {?ol.geom.Polygon} */ (this.get(GeolocationProperty.ACCURACY_GEOMETRY) || null); }; @@ -224,9 +220,7 @@ Geolocation.prototype.getAccuracyGeometry = function() { * @api */ Geolocation.prototype.getAltitude = function() { - return ( - /** @type {number|undefined} */ this.get(GeolocationProperty.ALTITUDE) - ); + return /** @type {number|undefined} */ (this.get(GeolocationProperty.ALTITUDE)); }; @@ -238,9 +232,7 @@ Geolocation.prototype.getAltitude = function() { * @api */ Geolocation.prototype.getAltitudeAccuracy = function() { - return ( - /** @type {number|undefined} */ this.get(GeolocationProperty.ALTITUDE_ACCURACY) - ); + return /** @type {number|undefined} */ (this.get(GeolocationProperty.ALTITUDE_ACCURACY)); }; @@ -253,9 +245,7 @@ Geolocation.prototype.getAltitudeAccuracy = function() { * @api */ Geolocation.prototype.getHeading = function() { - return ( - /** @type {number|undefined} */ this.get(GeolocationProperty.HEADING) - ); + return /** @type {number|undefined} */ (this.get(GeolocationProperty.HEADING)); }; @@ -267,9 +257,7 @@ Geolocation.prototype.getHeading = function() { * @api */ Geolocation.prototype.getPosition = function() { - return ( - /** @type {ol.Coordinate|undefined} */ this.get(GeolocationProperty.POSITION) - ); + return /** @type {ol.Coordinate|undefined} */ (this.get(GeolocationProperty.POSITION)); }; @@ -281,9 +269,7 @@ Geolocation.prototype.getPosition = function() { * @api */ Geolocation.prototype.getProjection = function() { - return ( - /** @type {ol.proj.Projection|undefined} */ this.get(GeolocationProperty.PROJECTION) - ); + return /** @type {ol.proj.Projection|undefined} */ (this.get(GeolocationProperty.PROJECTION)); }; @@ -295,9 +281,7 @@ Geolocation.prototype.getProjection = function() { * @api */ Geolocation.prototype.getSpeed = function() { - return ( - /** @type {number|undefined} */ this.get(GeolocationProperty.SPEED) - ); + return /** @type {number|undefined} */ (this.get(GeolocationProperty.SPEED)); }; @@ -308,9 +292,7 @@ Geolocation.prototype.getSpeed = function() { * @api */ Geolocation.prototype.getTracking = function() { - return ( - /** @type {boolean} */ this.get(GeolocationProperty.TRACKING) - ); + return /** @type {boolean} */ (this.get(GeolocationProperty.TRACKING)); }; @@ -324,9 +306,7 @@ Geolocation.prototype.getTracking = function() { * @api */ Geolocation.prototype.getTrackingOptions = function() { - return ( - /** @type {GeolocationPositionOptions|undefined} */ this.get(GeolocationProperty.TRACKING_OPTIONS) - ); + return /** @type {GeolocationPositionOptions|undefined} */ (this.get(GeolocationProperty.TRACKING_OPTIONS)); }; diff --git a/src/ol/Overlay.js b/src/ol/Overlay.js index 89ae483717..a4a01a125a 100644 --- a/src/ol/Overlay.js +++ b/src/ol/Overlay.js @@ -171,7 +171,7 @@ inherits(Overlay, BaseObject); * @api */ Overlay.prototype.getElement = function() { - return (/** @type {Element|undefined} */ this.get(Property.ELEMENT)); + return /** @type {Element|undefined} */ (this.get(Property.ELEMENT)); }; @@ -192,7 +192,7 @@ Overlay.prototype.getId = function() { * @api */ Overlay.prototype.getMap = function() { - return (/** @type {ol.PluggableMap|undefined} */ this.get(Property.MAP)); + return /** @type {ol.PluggableMap|undefined} */ (this.get(Property.MAP)); }; @@ -203,7 +203,7 @@ Overlay.prototype.getMap = function() { * @api */ Overlay.prototype.getOffset = function() { - return (/** @type {Array.} */ this.get(Property.OFFSET)); + return /** @type {Array.} */ (this.get(Property.OFFSET)); }; @@ -215,7 +215,7 @@ Overlay.prototype.getOffset = function() { * @api */ Overlay.prototype.getPosition = function() { - return (/** @type {ol.Coordinate|undefined} */ this.get(Property.POSITION)); + return /** @type {ol.Coordinate|undefined} */ (this.get(Property.POSITION)); }; @@ -227,7 +227,7 @@ Overlay.prototype.getPosition = function() { * @api */ Overlay.prototype.getPositioning = function() { - return (/** @type {ol.OverlayPositioning} */ this.get(Property.POSITIONING)); + return /** @type {ol.OverlayPositioning} */ (this.get(Property.POSITIONING)); }; diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index 5995fa2131..ec018bf7e2 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -664,9 +664,7 @@ PluggableMap.prototype.getEventPixel = function(event) { * @api */ PluggableMap.prototype.getTarget = function() { - return ( - /** @type {Element|string|undefined} */ this.get(MapProperty.TARGET) - ); + return /** @type {Element|string|undefined} */ (this.get(MapProperty.TARGET)); }; @@ -762,9 +760,7 @@ PluggableMap.prototype.getInteractions = function() { * @api */ PluggableMap.prototype.getLayerGroup = function() { - return ( - /** @type {ol.layer.Group} */ this.get(MapProperty.LAYERGROUP) - ); + return /** @type {ol.layer.Group} */ (this.get(MapProperty.LAYERGROUP)); }; @@ -813,9 +809,7 @@ PluggableMap.prototype.getRenderer = function() { * @api */ PluggableMap.prototype.getSize = function() { - return ( - /** @type {ol.Size|undefined} */ this.get(MapProperty.SIZE) - ); + return /** @type {ol.Size|undefined} */ (this.get(MapProperty.SIZE)); }; @@ -827,9 +821,7 @@ PluggableMap.prototype.getSize = function() { * @api */ PluggableMap.prototype.getView = function() { - return ( - /** @type {ol.View} */ this.get(MapProperty.VIEW) - ); + return /** @type {ol.View} */ (this.get(MapProperty.VIEW)); }; diff --git a/src/ol/View.js b/src/ol/View.js index 8b178bedbd..34adb308d7 100644 --- a/src/ol/View.js +++ b/src/ol/View.js @@ -571,9 +571,7 @@ View.prototype.constrainRotation = function(rotation, opt_delta) { * @api */ View.prototype.getCenter = function() { - return ( - /** @type {ol.Coordinate|undefined} */ this.get(ViewProperty.CENTER) - ); + return /** @type {ol.Coordinate|undefined} */ (this.get(ViewProperty.CENTER)); }; @@ -700,9 +698,7 @@ View.prototype.getProjection = function() { * @api */ View.prototype.getResolution = function() { - return ( - /** @type {number|undefined} */ this.get(ViewProperty.RESOLUTION) - ); + return /** @type {number|undefined} */ (this.get(ViewProperty.RESOLUTION)); }; @@ -763,9 +759,7 @@ View.prototype.getResolutionForValueFunction = function(opt_power) { * @api */ View.prototype.getRotation = function() { - return ( - /** @type {number} */ this.get(ViewProperty.ROTATION) - ); + return /** @type {number} */ (this.get(ViewProperty.ROTATION)); }; diff --git a/src/ol/control/MousePosition.js b/src/ol/control/MousePosition.js index 045eb8d52b..4cacf7de63 100644 --- a/src/ol/control/MousePosition.js +++ b/src/ol/control/MousePosition.js @@ -133,9 +133,7 @@ MousePosition.prototype.handleProjectionChanged_ = function() { * @api */ MousePosition.prototype.getCoordinateFormat = function() { - return ( - /** @type {ol.CoordinateFormatType|undefined} */ this.get(COORDINATE_FORMAT) - ); + return /** @type {ol.CoordinateFormatType|undefined} */ (this.get(COORDINATE_FORMAT)); }; @@ -147,9 +145,7 @@ MousePosition.prototype.getCoordinateFormat = function() { * @api */ MousePosition.prototype.getProjection = function() { - return ( - /** @type {ol.proj.Projection|undefined} */ this.get(PROJECTION) - ); + return /** @type {ol.proj.Projection|undefined} */ (this.get(PROJECTION)); }; diff --git a/src/ol/control/ScaleLine.js b/src/ol/control/ScaleLine.js index 1c6fc34399..404c431b57 100644 --- a/src/ol/control/ScaleLine.js +++ b/src/ol/control/ScaleLine.js @@ -119,9 +119,7 @@ inherits(ScaleLine, Control); * @api */ ScaleLine.prototype.getUnits = function() { - return ( - /** @type {ol.control.ScaleLineUnits|undefined} */ this.get(UNITS) - ); + return /** @type {ol.control.ScaleLineUnits|undefined} */ (this.get(UNITS)); }; diff --git a/src/ol/format/GMLBase.js b/src/ol/format/GMLBase.js index 888c9209b8..b8935b27e5 100644 --- a/src/ol/format/GMLBase.js +++ b/src/ol/format/GMLBase.js @@ -199,12 +199,9 @@ GMLBase.prototype.readGeometryElement = function(node, objectStack) { context['srsName'] = node.firstElementChild.getAttribute('srsName'); context['srsDimension'] = node.firstElementChild.getAttribute('srsDimension'); /** @type {ol.geom.Geometry} */ - const geometry = pushParseAndPop(null, - this.GEOMETRY_PARSERS_, node, objectStack, this); + const geometry = pushParseAndPop(null, this.GEOMETRY_PARSERS_, node, objectStack, this); if (geometry) { - return ( - /** @type {ol.geom.Geometry} */ transformWithOptions(geometry, false, context) - ); + return /** @type {ol.geom.Geometry} */ (transformWithOptions(geometry, false, context)); } else { return undefined; } diff --git a/src/ol/format/WKT.js b/src/ol/format/WKT.js index 62b90c35a9..5da81da3e8 100644 --- a/src/ol/format/WKT.js +++ b/src/ol/format/WKT.js @@ -796,9 +796,7 @@ WKT.prototype.readGeometry; WKT.prototype.readGeometryFromText = function(text, opt_options) { const geometry = this.parse_(text); if (geometry) { - return ( - /** @type {ol.geom.Geometry} */ transformWithOptions(geometry, false, opt_options) - ); + return /** @type {ol.geom.Geometry} */ (transformWithOptions(geometry, false, opt_options)); } else { return null; } diff --git a/src/ol/interaction/Interaction.js b/src/ol/interaction/Interaction.js index d707b113da..604f9433fb 100644 --- a/src/ol/interaction/Interaction.js +++ b/src/ol/interaction/Interaction.js @@ -67,7 +67,7 @@ inherits(Interaction, BaseObject); * @api */ Interaction.prototype.getActive = function() { - return (/** @type {boolean} */ this.get(InteractionProperty.ACTIVE)); + return /** @type {boolean} */ (this.get(InteractionProperty.ACTIVE)); }; diff --git a/src/ol/layer/Base.js b/src/ol/layer/Base.js index e0368f0991..265e30a242 100644 --- a/src/ol/layer/Base.js +++ b/src/ol/layer/Base.js @@ -114,9 +114,7 @@ BaseLayer.prototype.getLayerStatesArray = function(opt_states) {}; * @api */ BaseLayer.prototype.getExtent = function() { - return ( - /** @type {ol.Extent|undefined} */ this.get(LayerProperty.EXTENT) - ); + return /** @type {ol.Extent|undefined} */ (this.get(LayerProperty.EXTENT)); }; @@ -127,9 +125,7 @@ BaseLayer.prototype.getExtent = function() { * @api */ BaseLayer.prototype.getMaxResolution = function() { - return ( - /** @type {number} */ this.get(LayerProperty.MAX_RESOLUTION) - ); + return /** @type {number} */ (this.get(LayerProperty.MAX_RESOLUTION)); }; @@ -140,9 +136,7 @@ BaseLayer.prototype.getMaxResolution = function() { * @api */ BaseLayer.prototype.getMinResolution = function() { - return ( - /** @type {number} */ this.get(LayerProperty.MIN_RESOLUTION) - ); + return /** @type {number} */ (this.get(LayerProperty.MIN_RESOLUTION)); }; @@ -153,9 +147,7 @@ BaseLayer.prototype.getMinResolution = function() { * @api */ BaseLayer.prototype.getOpacity = function() { - return ( - /** @type {number} */ this.get(LayerProperty.OPACITY) - ); + return /** @type {number} */ (this.get(LayerProperty.OPACITY)); }; @@ -173,9 +165,7 @@ BaseLayer.prototype.getSourceState = function() {}; * @api */ BaseLayer.prototype.getVisible = function() { - return ( - /** @type {boolean} */ this.get(LayerProperty.VISIBLE) - ); + return /** @type {boolean} */ (this.get(LayerProperty.VISIBLE)); }; @@ -187,9 +177,7 @@ BaseLayer.prototype.getVisible = function() { * @api */ BaseLayer.prototype.getZIndex = function() { - return ( - /** @type {number} */ this.get(LayerProperty.Z_INDEX) - ); + return /** @type {number} */ (this.get(LayerProperty.Z_INDEX)); }; diff --git a/src/ol/layer/Group.js b/src/ol/layer/Group.js index 650179f86c..a986ee894c 100644 --- a/src/ol/layer/Group.js +++ b/src/ol/layer/Group.js @@ -157,7 +157,7 @@ LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) { * @api */ LayerGroup.prototype.getLayers = function() { - return (/** @type {!ol.Collection.} */ this.get(Property.LAYERS)); + return /** @type {!ol.Collection.} */ (this.get(Property.LAYERS)); }; diff --git a/src/ol/layer/Heatmap.js b/src/ol/layer/Heatmap.js index 584b28c943..c30749dd00 100644 --- a/src/ol/layer/Heatmap.js +++ b/src/ol/layer/Heatmap.js @@ -190,7 +190,7 @@ Heatmap.prototype.createCircle_ = function() { * @observable */ Heatmap.prototype.getBlur = function() { - return (/** @type {number} */ this.get(Property.BLUR)); + return /** @type {number} */ (this.get(Property.BLUR)); }; @@ -201,7 +201,7 @@ Heatmap.prototype.getBlur = function() { * @observable */ Heatmap.prototype.getGradient = function() { - return (/** @type {Array.} */ this.get(Property.GRADIENT)); + return /** @type {Array.} */ (this.get(Property.GRADIENT)); }; @@ -212,7 +212,7 @@ Heatmap.prototype.getGradient = function() { * @observable */ Heatmap.prototype.getRadius = function() { - return (/** @type {number} */ this.get(Property.RADIUS)); + return /** @type {number} */ (this.get(Property.RADIUS)); }; diff --git a/src/ol/layer/Tile.js b/src/ol/layer/Tile.js index b96e324c1f..f0e0d11f66 100644 --- a/src/ol/layer/Tile.js +++ b/src/ol/layer/Tile.js @@ -53,7 +53,7 @@ inherits(TileLayer, Layer); * @api */ TileLayer.prototype.getPreload = function() { - return (/** @type {number} */ this.get(TileProperty.PRELOAD)); + return /** @type {number} */ (this.get(TileProperty.PRELOAD)); }; @@ -84,7 +84,7 @@ TileLayer.prototype.setPreload = function(preload) { * @api */ TileLayer.prototype.getUseInterimTilesOnError = function() { - return (/** @type {boolean} */ this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR)); + return /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR)); }; diff --git a/src/ol/layer/Vector.js b/src/ol/layer/Vector.js index 49c549c234..494049a44d 100644 --- a/src/ol/layer/Vector.js +++ b/src/ol/layer/Vector.js @@ -133,7 +133,7 @@ VectorLayer.prototype.getRenderBuffer = function() { * order. */ VectorLayer.prototype.getRenderOrder = function() { - return (/** @type {ol.RenderOrderFunction|null|undefined} */ this.get(Property.RENDER_ORDER)); + return /** @type {ol.RenderOrderFunction|null|undefined} */ (this.get(Property.RENDER_ORDER)); }; diff --git a/src/ol/layer/VectorTile.js b/src/ol/layer/VectorTile.js index 35f6b42501..9cf9d95f09 100644 --- a/src/ol/layer/VectorTile.js +++ b/src/ol/layer/VectorTile.js @@ -64,7 +64,7 @@ inherits(VectorTileLayer, VectorLayer); * @api */ VectorTileLayer.prototype.getPreload = function() { - return (/** @type {number} */ this.get(TileProperty.PRELOAD)); + return /** @type {number} */ (this.get(TileProperty.PRELOAD)); }; @@ -75,7 +75,7 @@ VectorTileLayer.prototype.getPreload = function() { * @api */ VectorTileLayer.prototype.getUseInterimTilesOnError = function() { - return (/** @type {boolean} */ this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR)); + return /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR)); };