Add signatures for once.

This commit is contained in:
Simon Seyock
2021-06-23 18:47:14 +02:00
committed by Andreas Hocevar
parent 1870a64984
commit d914006d51
25 changed files with 364 additions and 126 deletions

View File

@@ -67,6 +67,14 @@ class GeolocationError extends BaseEvent {
* 'change:trackingOptions'} GeolocationObjectEventTypes
*/
/***
* @typedef {import("./Observable").OnSignature<import("./Observable").EventTypes, import("./events/Event.js").default> &
* import("./Observable").OnSignature<GeolocationObjectEventTypes, import("./Object").ObjectEvent> &
* import("./Observable").OnSignature<'error', GeolocationError> &
* import("./Observable").CombinedOnSignature<import("./Observable").EventTypes|GeolocationObjectEventTypes|
* 'error'>} GeolocationOnSignature
*/
/**
* @classdesc
* Helper class for providing HTML5 Geolocation capabilities.
@@ -98,13 +106,15 @@ class Geolocation extends BaseObject {
super();
/***
* @type {import("./Observable").OnSignature<import("./Observable").EventTypes, import("./events/Event.js").default> &
* import("./Observable").OnSignature<GeolocationObjectEventTypes, import("./Object").ObjectEvent> &
* import("./Observable").OnSignature<'error', GeolocationError> &
* import("./Observable").CombinedOnSignature<import("./Observable").EventTypes|GeolocationObjectEventTypes|'error'>}
* @type {GeolocationOnSignature}
*/
this.on;
/***
* @type {GeolocationOnSignature}
*/
this.once;
const options = opt_options || {};
/**