Skip to content

Commit

Permalink
[TS migration] Migrate 'KeyboardShortcuts.js' lib to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
BartoszGrajdek committed Sep 7, 2023
1 parent 1bdc5ac commit dc84244
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Onyx from 'react-native-onyx';
import ONYXKEYS from '../../ONYXKEYS';

let isShortcutsModalOpen;
let isShortcutsModalOpen: boolean | null;
Onyx.connect({
key: ONYXKEYS.IS_SHORTCUTS_MODAL_OPEN,
callback: (flag) => (isShortcutsModalOpen = flag),
Expand All @@ -11,7 +11,7 @@ Onyx.connect({
/**
* Set keyboard shortcuts flag to show modal
*/
function showKeyboardShortcutModal() {
function showKeyboardShortcutModal(): void {
if (isShortcutsModalOpen) {
return;
}
Expand All @@ -21,7 +21,7 @@ function showKeyboardShortcutModal() {
/**
* Unset keyboard shortcuts flag to hide modal
*/
function hideKeyboardShortcutModal() {
function hideKeyboardShortcutModal(): void {
if (!isShortcutsModalOpen) {
return;
}
Expand Down

0 comments on commit dc84244

Please sign in to comment.