🤖 Merge PR #62891 [mousetrap] Return type of callback should be void by @rhysd

This commit is contained in:
Linda_pp
2022-10-28 03:37:31 +09:00
committed by GitHub
parent c1208d1beb
commit 84c35a3194

View File

@@ -18,7 +18,7 @@ declare namespace Mousetrap {
stopCallback: (e: ExtendedKeyboardEvent, element: Element, combo: string) => boolean;
bind(
keys: string | string[],
callback: (e: ExtendedKeyboardEvent, combo: string) => any,
callback: (e: ExtendedKeyboardEvent, combo: string) => void,
action?: string,
): MousetrapInstance;
unbind(keys: string | string[], action?: string): MousetrapInstance;
@@ -30,7 +30,7 @@ declare namespace Mousetrap {
stopCallback: (e: ExtendedKeyboardEvent, element: Element, combo: string) => boolean;
bind(
keys: string | string[],
callback: (e: ExtendedKeyboardEvent, combo: string) => any,
callback: (e: ExtendedKeyboardEvent, combo: string) => void,
action?: string,
): this;
unbind(keys: string | string[], action?: string): this;