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

Commit 9189069

Browse files
author
Will Anderson
committed
Fix up some callback style code samples
1 parent 3aa62ab commit 9189069

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Contains details about an update package that has been downloaded locally or alr
8181
- __packageSize__: The size of the package, in bytes. (Number)
8282

8383
### Methods
84-
- __apply(applySuccess, applyError, rollbackTimeout)__: Applies this package to the application. The application will be reloaded with this package and on every application launch this package will be loaded.
84+
- __apply(rollbackTimeout): Promise__: Applies this package to the application. The application will be reloaded with this package and on every application launch this package will be loaded.
8585
If the rollbackTimeout parameter is provided, the application will wait for a codePush.notifyApplicationReady() for the given number of milliseconds.
8686
If codePush.notifyApplicationReady() is called before the time period specified by rollbackTimeout, the apply operation is considered a success.
8787
Otherwise, the apply operation will be marked as failed, and the application is reverted to its previous version.
@@ -99,8 +99,7 @@ Contains details about an update package that is available for download.
9999
- __downloadUrl__: The URL at which the package is available for download. (String)
100100

101101
### Methods
102-
- __download(downloadSuccess, downloadError)__: Downloads the package update from the Code Push service. The ```downloadSuccess``` callback is invoked with a ```LocalPackage``` argument, representing the downloaded package.
103-
102+
- __download(): Promise<LocalPackage>__: Downloads the package update from the Code Push service. Returns a Promise that resolves with the LocalPackage.
104103

105104
## codePush.checkForUpdate
106105
Queries the Code Push server for updates.

0 commit comments

Comments
 (0)