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
+14 -4
View File
@@ -5,6 +5,14 @@ import BaseObject from '../Object.js';
import InteractionProperty from './Property.js';
import {easeOut, linear} from '../easing.js';
/***
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:active', import("../Object").ObjectEvent> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("../ObjectEventType").Types|
* 'change:active'>} InteractionOnSignature
*/
/**
* Object literal with config options for interactions.
* @typedef {Object} InteractionOptions
@@ -37,13 +45,15 @@ class Interaction extends BaseObject {
super();
/***
* @type {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:active', import("../Object").ObjectEvent> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("../ObjectEventType").Types|'change:active'>}
* @type {InteractionOnSignature}
*/
this.on;
/***
* @type {InteractionOnSignature}
*/
this.once;
if (opt_options && opt_options.handleEvent) {
this.handleEvent = opt_options.handleEvent;
}