From acb16e3aa92fc0ee503b78f2af3969492e60c9d7 Mon Sep 17 00:00:00 2001 From: Bartosz Grajdek Date: Sun, 10 Sep 2023 22:21:44 +0200 Subject: [PATCH 1/2] [TS migration] Migrate 'CurrentDate.js' lib to TypeScript --- src/libs/actions/{CurrentDate.js => CurrentDate.ts} | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) rename src/libs/actions/{CurrentDate.js => CurrentDate.ts} (74%) diff --git a/src/libs/actions/CurrentDate.js b/src/libs/actions/CurrentDate.ts similarity index 74% rename from src/libs/actions/CurrentDate.js rename to src/libs/actions/CurrentDate.ts index 078b35a760cb..7554fb16ea8f 100644 --- a/src/libs/actions/CurrentDate.js +++ b/src/libs/actions/CurrentDate.ts @@ -1,10 +1,7 @@ import Onyx from 'react-native-onyx'; import ONYXKEYS from '../../ONYXKEYS'; -/** - * @param {String} currentDate - */ -function setCurrentDate(currentDate) { +function setCurrentDate(currentDate: string): void { Onyx.set(ONYXKEYS.CURRENT_DATE, currentDate); } From 7064b80426de0906b45585f7d3a7ab4a25a87fab Mon Sep 17 00:00:00 2001 From: Bartosz Grajdek Date: Tue, 12 Sep 2023 11:14:54 +0200 Subject: [PATCH 2/2] Remove void return --- src/libs/actions/CurrentDate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/CurrentDate.ts b/src/libs/actions/CurrentDate.ts index 7554fb16ea8f..b19a3430e96f 100644 --- a/src/libs/actions/CurrentDate.ts +++ b/src/libs/actions/CurrentDate.ts @@ -1,7 +1,7 @@ import Onyx from 'react-native-onyx'; import ONYXKEYS from '../../ONYXKEYS'; -function setCurrentDate(currentDate: string): void { +function setCurrentDate(currentDate: string) { Onyx.set(ONYXKEYS.CURRENT_DATE, currentDate); }