mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-04 00:13:06 +08:00
feat(zip): add callback param so the progress function can be calleds (#4519)
This commit is contained in:
parent
bb1164f4fc
commit
f9110cb429
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user