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};