diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-11-27 19:33:01 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-11-27 19:33:01 -0500 |
commit | 14d12f6ba20b837a04c638b935773f3120e194ff (patch) | |
tree | dcd6b61d51ff39c97b60812b2bf3c8cd564347f8 /ext/js/display/element-overflow-controller.js | |
parent | d5b1217df3fe7480fc5f58fe194f5bbf73281094 (diff) |
Update timer types and such
Diffstat (limited to 'ext/js/display/element-overflow-controller.js')
-rw-r--r-- | ext/js/display/element-overflow-controller.js | 8 |
1 files changed, 4 insertions, 4 deletions
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); } |