Add typed signature for Observable#un()

This commit is contained in:
Andreas Hocevar
2021-06-25 10:51:27 +02:00
parent 3a73af842d
commit e9e664f3c9
25 changed files with 309 additions and 145 deletions

View File

@@ -68,11 +68,12 @@ class GeolocationError extends BaseEvent {
*/
/***
* @typedef {import("./Observable").OnSignature<import("./Observable").EventTypes, import("./events/Event.js").default> &
* import("./Observable").OnSignature<GeolocationObjectEventTypes, import("./Object").ObjectEvent> &
* import("./Observable").OnSignature<'error', GeolocationError> &
* @template Return
* @typedef {import("./Observable").OnSignature<import("./Observable").EventTypes, import("./events/Event.js").default, Return> &
* import("./Observable").OnSignature<GeolocationObjectEventTypes, import("./Object").ObjectEvent, Return> &
* import("./Observable").OnSignature<'error', GeolocationError, Return> &
* import("./Observable").CombinedOnSignature<import("./Observable").EventTypes|GeolocationObjectEventTypes|
* 'error'>} GeolocationOnSignature
* 'error', Return>} GeolocationOnSignature
*/
/**
@@ -106,15 +107,20 @@ class Geolocation extends BaseObject {
super();
/***
* @type {GeolocationOnSignature}
* @type {GeolocationOnSignature<import("./Observable.js").OnReturn>}
*/
this.on;
/***
* @type {GeolocationOnSignature}
* @type {GeolocationOnSignature<import("./Observable.js").OnReturn>}
*/
this.once;
/***
* @type {GeolocationOnSignature<void>}
*/
this.un;
const options = opt_options || {};
/**