chore(client): fix typecheck issues

This commit is contained in:
Elian Doran
2025-07-30 23:46:43 +03:00
parent 29b813fa3b
commit 8a587d4d21
8 changed files with 79 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
import utils from "./utils.js";
type ElementType = HTMLElement | Document;
type Handler = () => void;
type Handler = (e: KeyboardEvent) => void;
interface ShortcutBinding {
element: HTMLElement | Document;
@@ -45,7 +45,7 @@ function bindElShortcut($el: JQuery<ElementType | Element>, keyboardShortcut: st
if (matchesShortcut(e, keyboardShortcut)) {
e.preventDefault();
e.stopPropagation();
handler();
handler(e);
}
};