/** * Display switch for the Comments plugin. Manages the time of delayed displaying / hiding comments. * * @private * @class DisplaySwitch */ declare class DisplaySwitch { /** * Flag to determine if comment can be showed or hidden. State `true` mean that last performed action * was an attempt to show comment element. State `false` mean that it was attempt to hide comment element. * * @type {boolean} */ wasLastActionShow: boolean; /** * Registers a local hook listener scoped to this instance. Provided by the `localHooks` mixin. */ addLocalHook: (key: string, callback: Function) => void; /** * Executes all local hook listeners registered under the given name. Provided by the `localHooks` mixin. */ runLocalHooks: Function; /** * Removes all local hook listeners. Provided by the `localHooks` mixin. */ clearLocalHooks: Function; /** * Show comment after predefined delay. It keeps reference to immutable `debounce` function. * * @type {Function} */ showDebounced: Function | null; /** * Reference to timer, run by `setTimeout`, which is hiding comment. * * @type {number} */ hidingTimer: ReturnType | null; /** * Initializes the display switch and configures the debounced show delay. */ constructor(displayDelay: number); /** * Responsible for hiding comment after proper delay. */ hide(): void; /** * Responsible for showing comment after proper delay. * * @param {object} range Coordinates of selected cell. */ show(range: object): void; /** * Cancel hiding comment. */ cancelHiding(): void; /** * Update the switch settings. * * @param {number} displayDelay Delay of showing the comments (in milliseconds). */ updateDelay(displayDelay?: number): void; /** * Destroy the switcher. */ destroy(): void; } export default DisplaySwitch;