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

添加ts声明

This commit is contained in:
sunnylqm
2019-07-06 21:52:34 +08:00
parent d23178a851
commit b55a40c92c

35
index.d.ts vendored Normal file
View File

@@ -0,0 +1,35 @@
export const downloadRootDir: string;
export const packageVersion: string;
export const currentVersion: string;
export const isFirstTime: boolean;
export const isRolledBack: boolean;
export interface ExpiredResult {
expired: true;
downloadUrl: string;
}
export interface UpTodateResult {
upToDate: true;
}
export interface UpdateAvailableResult {
update: true;
name: string; // version name
hash: string;
description: string;
metaInfo: string;
updateUrl: string;
pdiffUrl: string;
diffUrl: string;
}
export function checkUpdate(appkey: string): Promise<ExpiredResult | UpTodateResult | UpdateAvailableResult>;
export function downloadUpdate(options: UpdateAvailableResult): Promise<undefined | string>;
export function switchVersion(hash: string): void;
export function switchVersionLater(hash: string): void;
export function markSuccess(): void;