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

Commit d09baad

Browse files
committed
update typings
1 parent 3705b6c commit d09baad

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

typings/react-native-code-push.d.ts

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,24 @@ declare namespace CodePush {
217217
* Notifies the CodePush runtime that an installed update is considered successful.
218218
*/
219219
function notifyAppReady(): Promise<void>;
220+
221+
/**
222+
* Allow CodePush to automatically restart the app if an update is installed with
223+
* InstallMode.ON_NEXT_RESTART_OPPORTUNITY.
224+
*/
225+
function allowRestart(): void;
226+
227+
/**
228+
* Forbid CodePush to automatically restart the app if an update is installed with
229+
* InstallMode.ON_NEXT_RESTART_OPPORTUNITY.
230+
*/
231+
function disallowRestart(): void;
232+
233+
/**
234+
* Check if CodePush is allowed to automatically restart the app if an update is installed
235+
* with InstallMode.ON_NEXT_RESTART_OPPORTUNITY.
236+
*/
237+
function restartAllowed(): boolean;
220238

221239
/**
222240
* Immediately restarts the app.
@@ -252,7 +270,14 @@ declare namespace CodePush {
252270
* Indicates that you want to install the update, but don't want to restart the
253271
* app until the next time the end user resumes it from the background.
254272
*/
255-
ON_NEXT_RESUME
273+
ON_NEXT_RESUME,
274+
275+
/**
276+
* Indicates that you want to install the update, and restart the app as soon as possible.
277+
* You can allow/forbid restarts with CodePush.allowRestart and CodePush.disallowRestart
278+
* respectively.
279+
*/
280+
ON_NEXT_RESTART_OPPORTUNITY
256281
}
257282

258283
/**

0 commit comments

Comments
 (0)