Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3350482
D9986.id33630.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D9986.id33630.diff
View Options
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<MediaMissionStep> = [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<MediaMissionStep> = [];
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<MediaMissionStep> = [];
// 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<MediaMissionStep> = [];
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<MediaMissionStep>,
result: MediaMissionFailure | ProcessImageResponse,
}> {
- const steps = [];
+ const steps: Array<MediaMissionStep> = [];
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<MediaMissionStep> = [],
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<MediaMissionStep> = [
+ { 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<MediaMissionStep>> {
- const steps = [];
+ const steps: Array<MediaMissionStep> = [];
let hasPermission = false,
permissionCheckExceptionMessage;
@@ -277,7 +279,7 @@
inputURI: string,
sendResult: (result: MediaMissionResult) => void,
): Promise<$ReadOnlyArray<MediaMissionStep>> {
- const steps = [];
+ const steps: Array<MediaMissionStep> = [];
let uri = inputURI;
let tempFile;
@@ -348,7 +350,7 @@
inputURI: string,
directory: string, // should end with a /
): Promise<IntermediateSaveResult> {
- const steps = [];
+ const steps: Array<MediaMissionStep> = [];
const { result: fetchBlobResult, steps: fetchBlobSteps } = await fetchBlob(
inputURI,
@@ -397,7 +399,7 @@
directory: string, // should end with a /
inputMIME: ?string,
): Promise<IntermediateSaveResult> {
- const steps = [];
+ const steps: Array<MediaMissionStep> = [];
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<MediaMissionStep>,
result: MediaMissionFailure | ProcessVideoResponse,
}> {
- const steps = [];
+ const steps: Array<MediaMissionStep> = [];
const path = pathFromURI(input.uri);
invariant(path, `could not extract path from ${input.uri}`);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 10:47 PM (19 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2572038
Default Alt Text
D9986.id33630.diff (4 KB)
Attached To
Mode
D9986: [Flow202][native][skip-ci] [2/x] Type all MediaMissionStep arrays
Attached
Detach File
Event Timeline
Log In to Comment