summaryrefslogtreecommitdiff
path: root/ext/js/display
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 19:33:01 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 19:33:01 -0500
commit14d12f6ba20b837a04c638b935773f3120e194ff (patch)
treedcd6b61d51ff39c97b60812b2bf3c8cd564347f8 /ext/js/display
parentd5b1217df3fe7480fc5f58fe194f5bbf73281094 (diff)
Update timer types and such
Diffstat (limited to 'ext/js/display')
-rw-r--r--ext/js/display/display-audio.js2
-rw-r--r--ext/js/display/display-notification.js2
-rw-r--r--ext/js/display/display.js2
-rw-r--r--ext/js/display/element-overflow-controller.js8
-rw-r--r--ext/js/display/option-toggle-hotkey-handler.js2
-rw-r--r--ext/js/display/search-display-controller.js2
6 files changed, 9 insertions, 9 deletions
diff --git a/ext/js/display/display-audio.js b/ext/js/display/display-audio.js
index 3fbfc3c8..3576decb 100644
--- a/ext/js/display/display-audio.js
+++ b/ext/js/display/display-audio.js
@@ -36,7 +36,7 @@ export class DisplayAudio {
this._playbackVolume = 1.0;
/** @type {boolean} */
this._autoPlay = false;
- /** @type {?number} */
+ /** @type {?import('core').Timeout} */
this._autoPlayAudioTimer = null;
/** @type {number} */
this._autoPlayAudioDelay = 400;
diff --git a/ext/js/display/display-notification.js b/ext/js/display/display-notification.js
index b3f20700..d1cfa537 100644
--- a/ext/js/display/display-notification.js
+++ b/ext/js/display/display-notification.js
@@ -34,7 +34,7 @@ export class DisplayNotification {
this._closeButton = /** @type {HTMLElement} */ (node.querySelector('.footer-notification-close-button'));
/** @type {EventListenerCollection} */
this._eventListeners = new EventListenerCollection();
- /** @type {?number} */
+ /** @type {?import('core').Timeout} */
this._closeTimer = null;
}
diff --git a/ext/js/display/display.js b/ext/js/display/display.js
index f14291d1..6e1450c3 100644
--- a/ext/js/display/display.js
+++ b/ext/js/display/display.js
@@ -117,7 +117,7 @@ export class Display extends EventDispatcher {
this._queryOffset = 0;
/** @type {HTMLElement} */
this._progressIndicator = /** @type {HTMLElement} */ (document.querySelector('#progress-indicator'));
- /** @type {?number} */
+ /** @type {?import('core').Timeout} */
this._progressIndicatorTimer = null;
/** @type {DynamicProperty<boolean>} */
this._progressIndicatorVisible = new DynamicProperty(false);
diff --git a/ext/js/display/element-overflow-controller.js b/ext/js/display/element-overflow-controller.js
index 1d2c808f..35277fa5 100644
--- a/ext/js/display/element-overflow-controller.js
+++ b/ext/js/display/element-overflow-controller.js
@@ -22,7 +22,7 @@ export class ElementOverflowController {
constructor() {
/** @type {Element[]} */
this._elements = [];
- /** @type {?number} */
+ /** @type {?(number|import('core').Timeout)} */
this._checkTimer = null;
/** @type {EventListenerCollection} */
this._eventListeners = new EventListenerCollection();
@@ -154,7 +154,7 @@ export class ElementOverflowController {
/**
* @param {() => void} callback
* @param {number} timeout
- * @returns {number}
+ * @returns {number|import('core').Timeout}
*/
_requestIdleCallback(callback, timeout) {
if (typeof requestIdleCallback === 'function') {
@@ -165,11 +165,11 @@ export class ElementOverflowController {
}
/**
- * @param {number} handle
+ * @param {number|import('core').Timeout} handle
*/
_cancelIdleCallback(handle) {
if (typeof cancelIdleCallback === 'function') {
- cancelIdleCallback(handle);
+ cancelIdleCallback(/** @type {number} */ (handle));
} else {
clearTimeout(handle);
}
diff --git a/ext/js/display/option-toggle-hotkey-handler.js b/ext/js/display/option-toggle-hotkey-handler.js
index 531e208d..edd7de5b 100644
--- a/ext/js/display/option-toggle-hotkey-handler.js
+++ b/ext/js/display/option-toggle-hotkey-handler.js
@@ -29,7 +29,7 @@ export class OptionToggleHotkeyHandler {
this._display = display;
/** @type {?import('./display-notification.js').DisplayNotification} */
this._notification = null;
- /** @type {?number} */
+ /** @type {?import('core').Timeout} */
this._notificationHideTimer = null;
/** @type {number} */
this._notificationHideTimeout = 5000;
diff --git a/ext/js/display/search-display-controller.js b/ext/js/display/search-display-controller.js
index b93757c2..98a4666b 100644
--- a/ext/js/display/search-display-controller.js
+++ b/ext/js/display/search-display-controller.js
@@ -63,7 +63,7 @@ export class SearchDisplayController {
this._wanakanaBound = false;
/** @type {boolean} */
this._introVisible = true;
- /** @type {?number} */
+ /** @type {?import('core').Timeout} */
this._introAnimationTimer = null;
/** @type {boolean} */
this._clipboardMonitorEnabled = false;