Fix parens grouping in typecasts
This commit is contained in:
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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.<number>} */ this.get(Property.OFFSET));
|
||||
return /** @type {Array.<number>} */ (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));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) {
|
||||
* @api
|
||||
*/
|
||||
LayerGroup.prototype.getLayers = function() {
|
||||
return (/** @type {!ol.Collection.<ol.layer.Base>} */ this.get(Property.LAYERS));
|
||||
return /** @type {!ol.Collection.<ol.layer.Base>} */ (this.get(Property.LAYERS));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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.<string>} */ this.get(Property.GRADIENT));
|
||||
return /** @type {Array.<string>} */ (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));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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));
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user