This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,24 @@ declare namespace CodePush {
217
217
* Notifies the CodePush runtime that an installed update is considered successful.
218
218
*/
219
219
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 ;
220
238
221
239
/**
222
240
* Immediately restarts the app.
@@ -252,7 +270,14 @@ declare namespace CodePush {
252
270
* Indicates that you want to install the update, but don't want to restart the
253
271
* app until the next time the end user resumes it from the background.
254
272
*/
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
256
281
}
257
282
258
283
/**
You can’t perform that action at this time.
0 commit comments