1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-17 20:06:10 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Implement download progress

This commit is contained in:
sunnylqm
2020-09-16 13:01:14 +08:00
parent a4052091e0
commit a966655faf
6 changed files with 1686 additions and 978 deletions

10
lib/index.d.ts vendored
View File

@@ -31,7 +31,11 @@ export type CheckResult =
export function checkUpdate(appkey: string): Promise<CheckResult>;
export function downloadUpdate(
options: UpdateAvailableResult,
info: UpdateAvailableResult,
eventListeners?: {
onDownloadProgress?: (data: ProgressData) => void;
onUnzipProgress?: (data: ProgressData) => void;
},
): Promise<undefined | string>;
export function switchVersion(hash: string): void;
@@ -56,8 +60,8 @@ export function setCustomEndpoints({
backupQueryUrl?: string;
}): void;
interface ProgressEvent {
interface ProgressData {
hashname: string;
received: number;
total: number;
}