microsoft / cordova-plugin-code-push

Cordova plugin for CodePush
http://appcenter.ms
Other
644 stars 334 forks source link

Typescript definition and documentation for sync method does not align with code #649

Open stevebering opened 4 years ago

stevebering commented 4 years ago

Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):

Description

The source code for the sync method takes 4 arguments (syncCallback, syncOptions, downloadProgress and syncErrback), but the documentation and the typescript definition file only describe the first 3 arguments. This causes linting issues when transpiling the code and keeps developers from being able to correctly implement the error callback function. I expect to have the documentation and typescript definition to match the implementation of the code.

Reproduction

Source:

codePush.js: CodePush.prototype.sync = function (syncCallback, syncOptions, downloadProgress, syncErrback)

codePush.d.ts: sync(syncCallback?: SuccessCallback, syncOptions?: SyncOptions, downloadProgress?: SuccessCallback): void;

Additional Information