Skip to content

Commit

Permalink
add return types
Browse files Browse the repository at this point in the history
  • Loading branch information
Skalakid committed Sep 18, 2023
1 parent 9f511af commit d731c90
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libs/actions/Device/generateDeviceID/index.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> {
return Promise.resolve(uniqueID);
}

Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/Device/generateDeviceID/index.desktop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> {
return window.electron.invoke(ELECTRON_EVENTS.REQUEST_DEVICE_ID);

Check failure on line 7 in src/libs/actions/Device/generateDeviceID/index.desktop.ts

View workflow job for this annotation

GitHub Actions / typecheck

Property 'electron' does not exist on type 'Window & typeof globalThis'. Did you mean 'Electron'?

Check failure on line 7 in src/libs/actions/Device/generateDeviceID/index.desktop.ts

View workflow job for this annotation

GitHub Actions / lint

Unsafe return of an `any` typed value
}

Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/Device/generateDeviceID/index.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> {
return DeviceInfo.getUniqueId().then((uniqueID) => `${deviceID}_${uniqueID}`);
}

Expand Down

0 comments on commit d731c90

Please sign in to comment.