From 85d836d90953aae5c451c5b4dea155a7c12b95e0 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 19 Jul 2018 11:46:44 +0200 Subject: [PATCH] Remove 'Geolocation' prefix from types So they are recognized by the TypeScript type checker. --- src/ol/Geolocation.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ol/Geolocation.js b/src/ol/Geolocation.js index 5f72759677..b096a10b44 100644 --- a/src/ol/Geolocation.js +++ b/src/ol/Geolocation.js @@ -15,7 +15,7 @@ import {get as getProjection, getTransformFromProjections, identityTransform} fr * @typedef {Object} Options * @property {boolean} [tracking=false] Start Tracking right after * instantiation. - * @property {GeolocationPositionOptions} [trackingOptions] Tracking options. + * @property {PositionOptions} [trackingOptions] Tracking options. * See {@link http://www.w3.org/TR/geolocation-API/#position_options_interface}. * @property {module:ol/proj~ProjectionLike} [projection] The projection the position * is reported in. @@ -135,7 +135,7 @@ class Geolocation extends BaseObject { /** * @private - * @param {GeolocationPosition} position position event. + * @param {Position} position position event. */ positionChange_(position) { const coords = position.coords; @@ -171,7 +171,7 @@ class Geolocation extends BaseObject { /** * @private - * @param {GeolocationPositionError} error error object. + * @param {PositionError} error error object. */ positionError_(error) { error.type = EventType.ERROR; @@ -286,14 +286,14 @@ class Geolocation extends BaseObject { /** * Get the tracking options. * @see http://www.w3.org/TR/geolocation-API/#position-options - * @return {GeolocationPositionOptions|undefined} PositionOptions as defined by + * @return {PositionOptions|undefined} PositionOptions as defined by * the [HTML5 Geolocation spec * ](http://www.w3.org/TR/geolocation-API/#position_options_interface). * @observable * @api */ getTrackingOptions() { - return /** @type {GeolocationPositionOptions|undefined} */ (this.get(GeolocationProperty.TRACKING_OPTIONS)); + return /** @type {PositionOptions|undefined} */ (this.get(GeolocationProperty.TRACKING_OPTIONS)); } /** @@ -320,7 +320,7 @@ class Geolocation extends BaseObject { /** * Set the tracking options. * @see http://www.w3.org/TR/geolocation-API/#position-options - * @param {GeolocationPositionOptions} options PositionOptions as defined by the + * @param {PositionOptions} options PositionOptions as defined by the * [HTML5 Geolocation spec * ](http://www.w3.org/TR/geolocation-API/#position_options_interface). * @observable