mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
feat(zip): add callback param so the progress function can be calleds (#4519)
This commit is contained in:
@@ -33,11 +33,12 @@ export class Zip extends AwesomeCordovaNativePlugin {
|
|||||||
* Extracts files from a ZIP archive
|
* Extracts files from a ZIP archive
|
||||||
* @param {string} sourceZip Source ZIP file
|
* @param {string} sourceZip Source ZIP file
|
||||||
* @param {string} destFolder Destination folder
|
* @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
|
* @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
|
* @returns {Promise<number>} returns a promise that resolves with a number. 0 is success, -1 is error
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
unzip(sourceZip: string, destFolder: string, onProgress?: Function): Promise<number> {
|
unzip(sourceZip: string, destFolder: string, onSuccess: Function, onProgress?: Function): Promise<number> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user