mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-11-23 07:53:38 +08:00
添加ts声明
This commit is contained in:
35
index.d.ts
vendored
Normal file
35
index.d.ts
vendored
Normal 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;
|
||||||
Reference in New Issue
Block a user