Skip to content

Commit

Permalink
Declare type on key event handlers
Browse files Browse the repository at this point in the history
CORL-1334
  • Loading branch information
nick-funk committed Sep 1, 2020
1 parent 3a9979d commit 63067b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/client/embed/WindowEvents.ts
@@ -1,7 +1,7 @@
import PymControl from "./PymControl";

export default function hookUpWindowEvents(pym: PymControl) {
window.addEventListener("keypress", (e) => {
window.addEventListener("keypress", (e: KeyboardEvent) => {
const payload = {
event: "keypress",
data: {
Expand Down
Expand Up @@ -132,7 +132,7 @@ const KeyboardShortcuts: FunctionComponent = () => {
}, [findPreviousElement, scrollToElement]);

const handleKeyMessage = useCallback(
(e: any) => {
(e) => {
try {
if (!e.data) {
return;
Expand Down Expand Up @@ -161,7 +161,7 @@ const KeyboardShortcuts: FunctionComponent = () => {
);

const handleKeyPress = useCallback(
(e: any) => {
(e: KeyboardEvent) => {
try {
if (e.shiftKey && e.key === "C") {
jumpToPreviousElement();
Expand Down

0 comments on commit 63067b3

Please sign in to comment.