From 23898a19c4fc3dd08b9e94b96f89dda84b9388af Mon Sep 17 00:00:00 2001 From: Mahesh Vagicherla Date: Sat, 28 Oct 2023 20:06:49 +0530 Subject: [PATCH] fix typecheck issue --- src/types/modules/react-native-key-command.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/modules/react-native-key-command.d.ts b/src/types/modules/react-native-key-command.d.ts index 5cac93f2a90b..4c7f07bd6d7e 100644 --- a/src/types/modules/react-native-key-command.d.ts +++ b/src/types/modules/react-native-key-command.d.ts @@ -23,9 +23,9 @@ declare module 'react-native-key-command' { keyModifierAlternate = 'keyModifierAlternate', } - type KeyCommand = {input: string; modifierFlags: string}; + type KeyCommand = {input: string; modifierFlags?: string}; - declare function addListener(keyCommand: KeyCommand, callback: (keycommandEvent: KeyCommand, event: Event) => void): () => void; + declare function addListener(keyCommand: KeyCommand, callback: (keycommandEvent: KeyCommand, event: KeyboardEvent) => void): () => void; // eslint-disable-next-line import/prefer-default-export export {constants, addListener};