Skip to content

Commit

Permalink
feat(zip): add callback param so the progress function can be calleds (
Browse files Browse the repository at this point in the history
  • Loading branch information
fxsalazar committed Jul 11, 2023
1 parent bb1164f commit f9110cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/@awesome-cordova-plugins/plugins/zip/index.ts
Expand Up @@ -33,11 +33,12 @@ export class Zip extends AwesomeCordovaNativePlugin {
* Extracts files from a ZIP archive
* @param {string} sourceZip Source ZIP file
* @param {string} destFolder Destination folder
* @param {Function} onSuccess callback to be called on when done
* @param {Function} onProgress optional callback to be called on progress update
* @returns {Promise<number>} returns a promise that resolves with a number. 0 is success, -1 is error
*/
@Cordova()
unzip(sourceZip: string, destFolder: string, onProgress?: Function): Promise<number> {
unzip(sourceZip: string, destFolder: string, onSuccess: Function, onProgress?: Function): Promise<number> {
return;
}
}

0 comments on commit f9110cb

Please sign in to comment.