diff --git a/native/account/registration/registration-server-call.js b/native/account/registration/registration-server-call.js --- a/native/account/registration/registration-server-call.js +++ b/native/account/registration/registration-server-call.js @@ -135,7 +135,7 @@ const dispatch = useDispatch(); const returnedFunc = React.useCallback( (input: RegistrationServerCallInput) => - new Promise( + new Promise( // eslint-disable-next-line no-async-promise-executor async (resolve, reject) => { try { diff --git a/native/backup/use-client-backup.js b/native/backup/use-client-backup.js --- a/native/backup/use-client-backup.js +++ b/native/backup/use-client-backup.js @@ -98,7 +98,7 @@ error: undefined, }; - const backupIDPromise = (async () => { + const backupIDPromise: Promise = (async () => { try { // We are using UserID instead of the username. // The reason is tha the initial version of the backup service @@ -128,7 +128,7 @@ deviceID: ed25519, }; - const userKeysPromise = (async () => { + const userKeysPromise: Promise = (async () => { try { const userKeysResponse = await getUserKeys(backupID, backupAuth); result.getUserKeys = true; @@ -139,7 +139,7 @@ return undefined; } })(); - const userDataPromise = (async () => { + const userDataPromise: Promise = (async () => { try { const userDataResponse = await getUserData(backupID, backupAuth); result.getUserData = true; diff --git a/native/media/file-utils.js b/native/media/file-utils.js --- a/native/media/file-utils.js +++ b/native/media/file-utils.js @@ -70,7 +70,10 @@ })(); } - const getLocalURIPromise = (async () => { + const getLocalURIPromise: Promise = (async () => { if (inputPath) { return { localURI: inputURI, path: inputPath }; } @@ -88,7 +91,7 @@ return { localURI, path }; })(); - const getOrientationPromise = (async () => { + const getOrientationPromise: Promise = (async () => { if (!optionalFields.orientation || !assetInfoPromise) { return null; } @@ -96,7 +99,7 @@ return orientation; })(); - const getFileSizePromise = (async () => { + const getFileSizePromise: Promise = (async () => { const localURIResult = await getLocalURIPromise; if (!localURIResult) { return null; @@ -109,7 +112,10 @@ return fileSize; })(); - const getTypesPromise = (async () => { + const getTypesPromise: Promise<{ + +mime: ?string, + +mediaType: ?MediaType, + }> = (async () => { if (!optionalFields.mime && !optionalFields.mediaType) { return { mime: null, mediaType: null }; } diff --git a/native/media/media-utils.js b/native/media/media-utils.js --- a/native/media/media-utils.js +++ b/native/media/media-utils.js @@ -73,9 +73,11 @@ }; const reportPromise = innerProcessMedia(selection, config, sendResult); - const resultPromise = new Promise(resolve => { - resolveResult = resolve; - }); + const resultPromise = new Promise( + resolve => { + resolveResult = resolve; + }, + ); return { reportPromise, resultPromise }; }