From da5da99999a81dd1e80e269a30d0f490c02ce6ab Mon Sep 17 00:00:00 2001 From: binarycat Date: Mon, 10 Mar 2025 13:36:12 -0500 Subject: [PATCH] main.js: handleEscape and handleShortcut accept KeyboardEvent --- src/librustdoc/html/static/js/main.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 9e98131a0072..728f47dbc4cf 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -518,7 +518,9 @@ function preLoadCss(cssUrl) { openParentDetails(document.getElementById(id)); } - // @ts-expect-error + /** + * @param {KeyboardEvent} ev + */ function handleEscape(ev) { // @ts-expect-error searchState.clearInputTimeout(); @@ -530,7 +532,9 @@ function preLoadCss(cssUrl) { window.hideAllModals(true); // true = reset focus for tooltips } - // @ts-expect-error + /** + * @param {KeyboardEvent} ev + */ function handleShortcut(ev) { // Don't interfere with browser shortcuts const disableShortcuts = getSettingValue("disable-shortcuts") === "true";