expo-updates
Version:
Fetches and manages remotely-hosted assets and updates to your app's JS bundle.
34 lines (33 loc) • 909 B
TypeScript
import Constants from 'expo-constants';
export declare enum UpdateEventType {
UPDATE_AVAILABLE = "updateAvailable",
NO_UPDATE_AVAILABLE = "noUpdateAvailable",
ERROR = "error"
}
export declare type ClassicManifest = typeof Constants.manifest;
export declare type Manifest = ClassicManifest | typeof Constants.manifest2;
export declare type UpdateCheckResult = {
isAvailable: false;
} | {
isAvailable: true;
manifest: Manifest;
};
export declare type UpdateFetchResult = {
isNew: false;
} | {
isNew: true;
manifest: Manifest;
};
export declare type Listener<E> = (event: E) => void;
export declare type UpdateEvent = {
type: UpdateEventType.NO_UPDATE_AVAILABLE;
} | {
type: UpdateEventType.UPDATE_AVAILABLE;
manifest: Manifest;
} | {
type: UpdateEventType.ERROR;
message: string;
};
export declare type LocalAssets = {
[remoteUrl: string]: string;
};