diff --git a/native/input/input-state-container.react.js b/native/input/input-state-container.react.js --- a/native/input/input-state-container.react.js +++ b/native/input/input-state-container.react.js @@ -59,6 +59,7 @@ NativeMediaSelection, MediaMissionResult, MediaMission, + MediaMissionStep, } from 'lib/types/media-types.js'; import { messageTypes } from 'lib/types/message-types-enum.js'; import { @@ -728,7 +729,7 @@ const { ids, selection } = uploadFileInput; const { localMediaID } = ids; const start = selection.sendTime; - const steps = [selection]; + const steps: Array = [selection]; let encryptionSteps = []; let serverID; let userTime; diff --git a/native/media/blob-utils.js b/native/media/blob-utils.js --- a/native/media/blob-utils.js +++ b/native/media/blob-utils.js @@ -72,7 +72,7 @@ result: MediaMissionFailure | FetchBlobResult, }> { const uri = getFetchableURI(inputURI); - const steps = []; + const steps: Array = []; let blob, fetchExceptionMessage; const fetchStart = Date.now(); diff --git a/native/media/encryption-utils.js b/native/media/encryption-utils.js --- a/native/media/encryption-utils.js +++ b/native/media/encryption-utils.js @@ -179,7 +179,7 @@ 'encryptMedia should only be called on unencrypted photos and videos', ); const { uploadURI } = preprocessedMedia; - const steps = []; + const steps: Array = []; // Encrypt the media file const { steps: encryptionSteps, result: encryptionResult } = 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 @@ -56,7 +56,7 @@ result: MediaMissionFailure | FetchFileInfoResult, }> { const { mediaNativeID } = optionalInputs; - const steps = []; + const steps: Array = []; let assetInfoPromise, assetURI; const inputPath = pathFromURI(inputURI); diff --git a/native/media/image-utils.js b/native/media/image-utils.js --- a/native/media/image-utils.js +++ b/native/media/image-utils.js @@ -30,7 +30,7 @@ steps: $ReadOnlyArray, result: MediaMissionFailure | ProcessImageResponse, }> { - const steps = []; + const steps: Array = []; let { uri, dimensions, mime } = input; const { fileSize, orientation } = input; 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 @@ -139,7 +139,7 @@ } }; - const steps = [], + const steps: Array = [], completeBeforeFinish = []; const finish = async (failure?: MediaMissionFailure) => { if (!resultReturned) { diff --git a/native/media/save-media.js b/native/media/save-media.js --- a/native/media/save-media.js +++ b/native/media/save-media.js @@ -64,7 +64,9 @@ }, ) => { const start = Date.now(); - const steps = [{ step: 'save_media', uri, time: start }]; + const steps: Array = [ + { step: 'save_media', uri, time: start }, + ]; const { resultPromise, reportPromise } = saveMedia(uri, 'request'); const result = await resultPromise; @@ -173,7 +175,7 @@ permissions: Permissions, sendResult: (result: MediaMissionResult) => void, ): Promise<$ReadOnlyArray> { - const steps = []; + const steps: Array = []; let hasPermission = false, permissionCheckExceptionMessage; @@ -277,7 +279,7 @@ inputURI: string, sendResult: (result: MediaMissionResult) => void, ): Promise<$ReadOnlyArray> { - const steps = []; + const steps: Array = []; let uri = inputURI; let tempFile; @@ -348,7 +350,7 @@ inputURI: string, directory: string, // should end with a / ): Promise { - const steps = []; + const steps: Array = []; const { result: fetchBlobResult, steps: fetchBlobSteps } = await fetchBlob( inputURI, @@ -397,7 +399,7 @@ directory: string, // should end with a / inputMIME: ?string, ): Promise { - const steps = []; + const steps: Array = []; const path = pathFromURI(localURI); if (!path) { diff --git a/native/media/video-utils.js b/native/media/video-utils.js --- a/native/media/video-utils.js +++ b/native/media/video-utils.js @@ -58,7 +58,7 @@ steps: $ReadOnlyArray, result: MediaMissionFailure | ProcessVideoResponse, }> { - const steps = []; + const steps: Array = []; const path = pathFromURI(input.uri); invariant(path, `could not extract path from ${input.uri}`);