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

Fix index.d.ts

This commit is contained in:
sunnylqm
2020-10-06 23:40:51 +08:00
parent a1c2679427
commit b4feae292d

8
lib/index.d.ts vendored
View File

@@ -5,15 +5,19 @@ export const isFirstTime: boolean;
export const isRolledBack: boolean; export const isRolledBack: boolean;
export interface ExpiredResult { export interface ExpiredResult {
upToDate?: false;
expired: true; expired: true;
downloadUrl: string; downloadUrl: string;
} }
export interface UpTodateResult { export interface UpTodateResult {
expired?: false;
upToDate: true; upToDate: true;
} }
export interface UpdateAvailableResult { export interface UpdateAvailableResult {
expired?: false;
upToDate?: false;
update: true; update: true;
name: string; // version name name: string; // version name
hash: string; hash: string;
@@ -43,13 +47,13 @@ export function switchVersionLater(hash: string): void;
export function markSuccess(): void; export function markSuccess(): void;
export async function downloadAndInstallApk({ export function downloadAndInstallApk({
url, url,
onDownloadProgress, onDownloadProgress,
}: { }: {
url: string; url: string;
onDownloadProgress?: (data: ProgressData) => void; onDownloadProgress?: (data: ProgressData) => void;
}): void; }): Promise<void>;
/** /**
* @param {string} main - The main api endpoint * @param {string} main - The main api endpoint