@appzung/react-native-code-push
Version:
React Native plugin for the CodePush service
21 lines • 1.55 kB
TypeScript
import { SyncStatus } from './enums/SyncStatus.enum';
import type { DownloadProgressCallback, HandleBinaryVersionMismatchCallback, SyncOptions, SyncStatusChangedCallback, UpdateDialog } from './types';
/**
* Represents the default settings that will be used by the sync method if
* an update dialog is configured to be displayed.
*/
export declare const DEFAULT_UPDATE_DIALOG: UpdateDialog;
/**
* @function
*
* Allows checking for an update, downloading it and installing it, all with a single call.
*
* Unless you need custom UI and/or behavior, we recommend most developers to use this method when integrating CodePush into their apps, if they are not using the `withCodePush` HOC.
*
* @param options Options used to configure the end-user update experience (e.g. show a prompt?, install the update immediately?).
* @param syncStatusChangedCallback An optional callback that allows tracking the status of the sync operation, as opposed to simply checking the resolved state via the returned Promise.
* @param downloadProgressCallback An optional callback that allows tracking the progress of an update while it is being downloaded.
* @param handleBinaryVersionMismatchCallback An optional callback for handling target binary version mismatch
*/
export declare const sync: (options?: SyncOptions, syncStatusChangedCallback?: SyncStatusChangedCallback, downloadProgressCallback?: DownloadProgressCallback, handleBinaryVersionMismatchCallback?: HandleBinaryVersionMismatchCallback) => Promise<SyncStatus>;
//# sourceMappingURL=sync.d.ts.map