Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 9afec87

Browse files
committed
Updating d.ts file
1 parent af33b38 commit 9afec87

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

react-native-code-push.d.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ interface LocalPackage extends Package {
2525
* Installs the update by saving it to the location on disk where the runtime expects to find the latest version of the app.
2626
*
2727
* @param installMode Indicates when you would like the update changes to take affect for the end-user.
28+
* @param minimumBackgroundDuration For resume-based installs, this specifies the number of seconds the app needs to be in the background before forcing a restart. Defaults to 0 if unspecified.
2829
*/
29-
install(installMode: CodePush.InstallMode): ReactNativePromise<void>;
30+
install(installMode: CodePush.InstallMode, minimumBackgroundDuration?: number): ReactNativePromise<void>;
3031
}
3132

3233
interface Package {
@@ -106,11 +107,25 @@ interface SyncOptions {
106107
deploymentKey?: string;
107108

108109
/**
109-
* Indicates when you would like to "install" the update after downloading it, which includes reloading the JS bundle in order for
110-
* any changes to take affect. Defaults to codePush.InstallMode.ON_NEXT_RESTART.
110+
* Specifies when you would like to install optional updates (i.e. those that aren't marked as mandatory).
111+
* Defaults to codePush.InstallMode.ON_NEXT_RESTART.
111112
*/
112113
installMode?: CodePush.InstallMode;
113114

115+
/**
116+
* Specifies when you would like to install updates which are marked as mandatory.
117+
* Defaults to codePush.InstallMode.IMMEDIATE.
118+
*/
119+
mandatoryInstallMode?: CodePush.InstallMode;
120+
121+
/**
122+
* Specifies the minimum number of seconds that the app needs to have been in the background before restarting the app. This property
123+
* only applies to updates which are installed using `InstallMode.ON_NEXT_RESUME`, and can be useful for getting your update in front
124+
* of end users sooner, without being too obtrusive. Defaults to `0`, which has the effect of applying the update immediately after a
125+
* resume, regardless how long it was in the background.
126+
*/
127+
minimumBackgroundDuration?: number;
128+
114129
/**
115130
* An "options" object used to determine whether a confirmation dialog should be displayed to the end user when an update is available,
116131
* and if so, what strings to use. Defaults to null, which has the effect of disabling the dialog completely. Setting this to any truthy

0 commit comments

Comments
 (0)