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
+12 -6
View File
@@ -94,12 +94,13 @@ export class DragBoxEvent extends Event {
}
/***
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* @template Return
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:active', import("../Object").ObjectEvent> &
* import("../Observable").OnSignature<'boxcancel'|'boxdrag'|'boxend', DragBoxEvent> &
* 'change:active', import("../Object").ObjectEvent, Return> &
* import("../Observable").OnSignature<'boxcancel'|'boxdrag'|'boxend', DragBoxEvent, Return> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("../ObjectEventType").Types|
* 'change:active'|'boxcancel'|'boxdrag'|'boxend'>} DragBoxOnSignature
* 'change:active'|'boxcancel'|'boxdrag'|'boxend', Return>} DragBoxOnSignature
*/
/**
@@ -122,15 +123,20 @@ class DragBox extends PointerInteraction {
super();
/***
* @type {DragBoxOnSignature}
* @type {DragBoxOnSignature<import("../Observable").OnReturn>}
*/
this.on;
/***
* @type {DragBoxOnSignature}
* @type {DragBoxOnSignature<import("../Observable").OnReturn>}
*/
this.once;
/***
* @type {DragBoxOnSignature<void>}
*/
this.un;
const options = opt_options ? opt_options : {};
/**