From 6f2f5cd3faaa5a2552e2c8e9a886d9891bef2939 Mon Sep 17 00:00:00 2001 From: Egor Merkushev Date: Mon, 11 Dec 2017 14:53:12 +0300 Subject: [PATCH] Fix Flow error for DownloadFileOptions type --- FS.common.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/FS.common.js b/FS.common.js index e06c17e..f5ed90f 100755 --- a/FS.common.js +++ b/FS.common.js @@ -59,12 +59,14 @@ type DownloadFileOptions = { fromUrl: string; // URL to download file from toFile: string; // Local filesystem path to save the file to headers?: Headers; // An object of headers to be passed to the server - background?: boolean; // iOS only + background?: boolean; // Continue the download in the background after the app terminates (iOS only) + discretionary?: boolean; // Allow the OS to control the timing and speed of the download to improve perceived performance (iOS only) progressDivider?: number; - readTimeout?: number; - connectionTimeout?: number; begin?: (res: DownloadBeginCallbackResult) => void; progress?: (res: DownloadProgressCallbackResult) => void; + resumable?: () => void; // only supported on iOS yet + connectionTimeout?: number; // only supported on Android yet + readTimeout?: number; // supported on Android and iOS }; type DownloadBeginCallbackResult = {