From d731c900a1981b19a60e5c276afd95f45df944a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Mon, 18 Sep 2023 21:08:09 +0200 Subject: [PATCH] add return types --- src/libs/actions/Device/generateDeviceID/index.android.ts | 2 +- src/libs/actions/Device/generateDeviceID/index.desktop.ts | 2 +- src/libs/actions/Device/generateDeviceID/index.ios.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/actions/Device/generateDeviceID/index.android.ts b/src/libs/actions/Device/generateDeviceID/index.android.ts index 7d93d9778c68..80e79d57710b 100644 --- a/src/libs/actions/Device/generateDeviceID/index.android.ts +++ b/src/libs/actions/Device/generateDeviceID/index.android.ts @@ -23,7 +23,7 @@ const uniqueID = Str.guid(deviceID); * Furthermore, the deviceID prefix is not unique to a specific device, but is likely to change from one type of device to another. * Including this prefix will tell us with a reasonable degree of confidence if the user just uninstalled and reinstalled the app, or if they got a new device. */ -function generateDeviceID() { +function generateDeviceID(): Promise { return Promise.resolve(uniqueID); } diff --git a/src/libs/actions/Device/generateDeviceID/index.desktop.ts b/src/libs/actions/Device/generateDeviceID/index.desktop.ts index 2eceb81f9f86..5403fcfec9f7 100644 --- a/src/libs/actions/Device/generateDeviceID/index.desktop.ts +++ b/src/libs/actions/Device/generateDeviceID/index.desktop.ts @@ -3,7 +3,7 @@ import ELECTRON_EVENTS from '../../../../../desktop/ELECTRON_EVENTS'; /** * Get the unique ID of the current device. This should remain the same even if the user uninstalls and reinstalls the app. */ -function generateDeviceID() { +function generateDeviceID(): Promise { return window.electron.invoke(ELECTRON_EVENTS.REQUEST_DEVICE_ID); } diff --git a/src/libs/actions/Device/generateDeviceID/index.ios.ts b/src/libs/actions/Device/generateDeviceID/index.ios.ts index d4230e6f3acb..6cd568d5630e 100644 --- a/src/libs/actions/Device/generateDeviceID/index.ios.ts +++ b/src/libs/actions/Device/generateDeviceID/index.ios.ts @@ -5,7 +5,7 @@ const deviceID = DeviceInfo.getDeviceId(); /** * Get the unique ID of the current device. This should remain the same even if the user uninstalls and reinstalls the app. */ -function generateDeviceID() { +function generateDeviceID(): Promise { return DeviceInfo.getUniqueId().then((uniqueID) => `${deviceID}_${uniqueID}`); }