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

Commit 98aa25a

Browse files
committed
Whitespace cleanup
1 parent bc7ee8b commit 98aa25a

File tree

1 file changed

+47
-47
lines changed

1 file changed

+47
-47
lines changed

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

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
interface Promise<T> {
44
/**
55
* Append a rejection handler callback to the promise.
6-
*
6+
*
77
* @param onRejected Callback to be triggered when the promise is rejected.
88
*/
99
catch(onRejected?: (reason: any) => Promise<T>): Promise<T>;
10-
10+
1111
/**
1212
* Append a fulfillment and/or rejection handler to the promise.
13-
*
13+
*
1414
* @param onFulfilled Callback to be triggered when the promise is fulfilled.
1515
* @param onRejected Callback to be triggered when the promise is rejected.
1616
*/
@@ -25,7 +25,7 @@ export interface DownloadProgress {
2525
* The total number of bytes expected to be received for this update.
2626
*/
2727
totalBytes: number;
28-
28+
2929
/**
3030
* The number of bytes downloaded thus far.
3131
*/
@@ -35,109 +35,109 @@ export interface DownloadProgress {
3535
export interface LocalPackage extends Package {
3636
/**
3737
* Installs the update by saving it to the location on disk where the runtime expects to find the latest version of the app.
38-
*
38+
*
3939
* @param installMode Indicates when you would like the update changes to take affect for the end-user.
4040
* @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.
4141
*/
4242
install(installMode: CodePush.InstallMode, minimumBackgroundDuration?: number): Promise<void>;
4343
}
44-
44+
4545
export interface Package {
4646
/**
4747
* The app binary version that this update is dependent on. This is the value that was
4848
* specified via the appStoreVersion parameter when calling the CLI's release command.
4949
*/
5050
appVersion: string;
51-
51+
5252
/**
5353
* The deployment key that was used to originally download this update.
5454
*/
5555
deploymentKey: string;
56-
56+
5757
/**
5858
* The description of the update. This is the same value that you specified in the CLI when you released the update.
5959
*/
6060
description: string;
61-
61+
6262
/**
6363
* Indicates whether this update has been previously installed but was rolled back.
6464
*/
6565
failedInstall: boolean;
66-
66+
6767
/**
6868
* Indicates whether this is the first time the update has been run after being installed.
6969
*/
7070
isFirstRun: boolean;
71-
71+
7272
/**
7373
* Indicates whether the update is considered mandatory. This is the value that was specified in the CLI when the update was released.
7474
*/
7575
isMandatory: boolean;
76-
76+
7777
/**
7878
* Indicates whether this update is in a "pending" state. When true, that means the update has been downloaded and installed, but the app restart
79-
* needed to apply it hasn't occurred yet, and therefore, its changes aren't currently visible to the end-user.
79+
* needed to apply it hasn't occurred yet, and therefore, its changes aren't currently visible to the end-user.
8080
*/
8181
isPending: boolean;
82-
82+
8383
/**
8484
* The internal label automatically given to the update by the CodePush server. This value uniquely identifies the update within its deployment.
8585
*/
8686
label: string;
87-
87+
8888
/**
8989
* The SHA hash value of the update.
9090
*/
9191
packageHash: string;
92-
92+
9393
/**
9494
* The size of the code contained within the update, in bytes.
9595
*/
9696
packageSize: number;
9797
}
98-
98+
9999
export interface RemotePackage extends Package {
100100
/**
101-
* Downloads the available update from the CodePush service.
102-
*
101+
* Downloads the available update from the CodePush service.
102+
*
103103
* @param downloadProgressCallback An optional callback that allows tracking the progress of the update while it is being downloaded.
104104
*/
105105
download(downloadProgressCallback?: DowloadProgressCallback): Promise<LocalPackage>;
106-
106+
107107
/**
108108
* The URL at which the package is available for download.
109109
*/
110110
downloadUrl: string;
111111
}
112-
112+
113113
export interface SyncOptions {
114114
/**
115115
* Specifies the deployment key you want to query for an update against. By default, this value is derived from the Info.plist
116116
* file (iOS) and MainActivity.java file (Android), but this option allows you to override it from the script-side if you need to
117117
* dynamically use a different deployment for a specific call to sync.
118118
*/
119119
deploymentKey?: string;
120-
120+
121121
/**
122122
* Specifies when you would like to install optional updates (i.e. those that aren't marked as mandatory).
123123
* Defaults to codePush.InstallMode.ON_NEXT_RESTART.
124124
*/
125125
installMode?: CodePush.InstallMode;
126-
126+
127127
/**
128128
* Specifies when you would like to install updates which are marked as mandatory.
129129
* Defaults to codePush.InstallMode.IMMEDIATE.
130130
*/
131131
mandatoryInstallMode?: CodePush.InstallMode;
132-
132+
133133
/**
134134
* Specifies the minimum number of seconds that the app needs to have been in the background before restarting the app. This property
135135
* only applies to updates which are installed using `InstallMode.ON_NEXT_RESUME`, and can be useful for getting your update in front
136-
* of end users sooner, without being too obtrusive. Defaults to `0`, which has the effect of applying the update immediately after a
136+
* of end users sooner, without being too obtrusive. Defaults to `0`, which has the effect of applying the update immediately after a
137137
* resume, regardless how long it was in the background.
138138
*/
139139
minimumBackgroundDuration?: number;
140-
140+
141141
/**
142142
* An "options" object used to determine whether a confirmation dialog should be displayed to the end user when an update is available,
143143
* and if so, what strings to use. Defaults to null, which has the effect of disabling the dialog completely. Setting this to any truthy
@@ -146,46 +146,46 @@ export interface SyncOptions {
146146
*/
147147
updateDialog?: UpdateDialog;
148148
}
149-
149+
150150
export interface UpdateDialog {
151151
/**
152152
* Indicates whether you would like to append the description of an available release to the
153153
* notification message which is displayed to the end user. Defaults to false.
154154
*/
155155
appendReleaseDescription?: boolean;
156-
156+
157157
/**
158158
* Indicates the string you would like to prefix the release description with, if any, when
159159
* displaying the update notification to the end user. Defaults to " Description: "
160160
*/
161161
descriptionPrefix?: string;
162-
162+
163163
/**
164164
* The text to use for the button the end user must press in order to install a mandatory update. Defaults to "Continue".
165165
*/
166166
mandatoryContinueButtonLabel?: string;
167-
167+
168168
/**
169169
* The text used as the body of an update notification, when the update is specified as mandatory.
170170
* Defaults to "An update is available that must be installed.".
171171
*/
172172
mandatoryUpdateMessage?: string;
173-
173+
174174
/**
175175
* The text to use for the button the end user can press in order to ignore an optional update that is available. Defaults to "Ignore".
176176
*/
177177
optionalIgnoreButtonLabel?: string;
178-
178+
179179
/**
180180
* The text to use for the button the end user can press in order to install an optional update. Defaults to "Install".
181181
*/
182182
optionalInstallButtonLabel?: string;
183-
183+
184184
/**
185185
* The text used as the body of an update notification, when the update is optional. Defaults to "An update is available. Would you like to install it?".
186186
*/
187187
optionalUpdateMessage?: string;
188-
188+
189189
/**
190190
* The text used as the header of an update notification that is displayed to the end user. Defaults to "Update available".
191191
*/
@@ -220,21 +220,21 @@ declare namespace CodePush {
220220
* an update dialog is configured to be displayed.
221221
*/
222222
var DEFAULT_UPDATE_DIALOG: UpdateDialog;
223-
223+
224224
/**
225225
* Asks the CodePush service whether the configured app deployment has an update available.
226-
*
226+
*
227227
* @param deploymentKey The deployment key to use to query the CodePush server for an update.
228228
*/
229-
function checkForUpdate(deploymentKey?: string): Promise<RemotePackage>;
229+
function checkForUpdate(deploymentKey?: string): Promise<RemotePackage>;
230230

231231
/**
232232
* Retrieves the metadata for an installed update (e.g. description, mandatory).
233-
*
233+
*
234234
* @param updateState The state of the update you want to retrieve the metadata for. Defaults to UpdateState.RUNNING.
235235
*/
236236
function getUpdateMetadata(updateState?: UpdateState) : Promise<LocalPackage>;
237-
237+
238238
/**
239239
* Notifies the CodePush runtime that an installed update is considered successful.
240240
*/
@@ -252,14 +252,14 @@ declare namespace CodePush {
252252

253253
/**
254254
* Immediately restarts the app.
255-
*
255+
*
256256
* @param onlyIfUpdateIsPending Indicates whether you want the restart to no-op if there isn't currently a pending update.
257257
*/
258258
function restartApp(onlyIfUpdateIsPending?: boolean): void;
259-
259+
260260
/**
261261
* Allows checking for an update, downloading it and installing it, all with a single call.
262-
*
262+
*
263263
* @param options Options used to configure the end-user update experience (e.g. show an prompt?, install the update immediately?).
264264
* @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.
265265
* @param downloadProgressCallback An optional callback that allows tracking the progress of an update while it is being downloaded.
@@ -271,22 +271,22 @@ declare namespace CodePush {
271271
*/
272272
enum InstallMode {
273273
/**
274-
* Indicates that you want to install the update and restart the app immediately.
274+
* Indicates that you want to install the update and restart the app immediately.
275275
*/
276276
IMMEDIATE,
277-
277+
278278
/**
279-
* Indicates that you want to install the update, but not forcibly restart the app.
279+
* Indicates that you want to install the update, but not forcibly restart the app.
280280
*/
281281
ON_NEXT_RESTART,
282-
282+
283283
/**
284284
* Indicates that you want to install the update, but don't want to restart the
285285
* app until the next time the end user resumes it from the background.
286286
*/
287287
ON_NEXT_RESUME
288288
}
289-
289+
290290
/**
291291
* Indicates the current status of a sync operation.
292292
*/

0 commit comments

Comments
 (0)