Skip to content

Commit

Permalink
fix typecheck issue
Browse files Browse the repository at this point in the history
  • Loading branch information
b4s36t4 committed Oct 28, 2023
1 parent 5d45f0f commit 23898a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/types/modules/react-native-key-command.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 23898a1

Please sign in to comment.