Remove 'Geolocation' prefix from types
So they are recognized by the TypeScript type checker.
This commit is contained in:
@@ -15,7 +15,7 @@ import {get as getProjection, getTransformFromProjections, identityTransform} fr
|
|||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
* @property {boolean} [tracking=false] Start Tracking right after
|
* @property {boolean} [tracking=false] Start Tracking right after
|
||||||
* instantiation.
|
* instantiation.
|
||||||
* @property {GeolocationPositionOptions} [trackingOptions] Tracking options.
|
* @property {PositionOptions} [trackingOptions] Tracking options.
|
||||||
* See {@link http://www.w3.org/TR/geolocation-API/#position_options_interface}.
|
* See {@link http://www.w3.org/TR/geolocation-API/#position_options_interface}.
|
||||||
* @property {module:ol/proj~ProjectionLike} [projection] The projection the position
|
* @property {module:ol/proj~ProjectionLike} [projection] The projection the position
|
||||||
* is reported in.
|
* is reported in.
|
||||||
@@ -135,7 +135,7 @@ class Geolocation extends BaseObject {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {GeolocationPosition} position position event.
|
* @param {Position} position position event.
|
||||||
*/
|
*/
|
||||||
positionChange_(position) {
|
positionChange_(position) {
|
||||||
const coords = position.coords;
|
const coords = position.coords;
|
||||||
@@ -171,7 +171,7 @@ class Geolocation extends BaseObject {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {GeolocationPositionError} error error object.
|
* @param {PositionError} error error object.
|
||||||
*/
|
*/
|
||||||
positionError_(error) {
|
positionError_(error) {
|
||||||
error.type = EventType.ERROR;
|
error.type = EventType.ERROR;
|
||||||
@@ -286,14 +286,14 @@ class Geolocation extends BaseObject {
|
|||||||
/**
|
/**
|
||||||
* Get the tracking options.
|
* Get the tracking options.
|
||||||
* @see http://www.w3.org/TR/geolocation-API/#position-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
|
* the [HTML5 Geolocation spec
|
||||||
* ](http://www.w3.org/TR/geolocation-API/#position_options_interface).
|
* ](http://www.w3.org/TR/geolocation-API/#position_options_interface).
|
||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
getTrackingOptions() {
|
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.
|
* Set the tracking options.
|
||||||
* @see http://www.w3.org/TR/geolocation-API/#position-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
|
* [HTML5 Geolocation spec
|
||||||
* ](http://www.w3.org/TR/geolocation-API/#position_options_interface).
|
* ](http://www.w3.org/TR/geolocation-API/#position_options_interface).
|
||||||
* @observable
|
* @observable
|
||||||
|
|||||||
Reference in New Issue
Block a user