@@ -20,7 +20,7 @@ function retry(
20
20
. progress ( function ( data : any ) {
21
21
return progress ( onprogress ( data ) ) ;
22
22
} ) // When all is done resolve the Promise.
23
- . then ( function ( args : any ) {
23
+ . then ( function ( args : string [ ] ) {
24
24
return resolve ( args ) ;
25
25
} ) // Catch the error and pass it to the reject function of the Promise.
26
26
. catch ( function ( ) {
@@ -29,7 +29,7 @@ function retry(
29
29
. progress ( function ( data : any ) {
30
30
return progress ( onprogress ( data ) ) ;
31
31
} )
32
- . then ( function ( args : any ) {
32
+ . then ( function ( args : string [ ] ) {
33
33
return resolve ( args ) ;
34
34
} )
35
35
. catch ( function ( err : any ) {
@@ -61,8 +61,8 @@ export const createArchive =
61
61
options : any ,
62
62
override = false
63
63
) {
64
- return when . promise ( function (
65
- resolve : ( value : any ) => void ,
64
+ return when . promise < string [ ] > ( function (
65
+ resolve : ( args : string [ ] ) => void ,
66
66
reject : ( reason : any ) => void ,
67
67
progress : ( arg0 : any ) => any
68
68
) {
@@ -125,7 +125,7 @@ export const deleteArchive =
125
125
options : { files ?: string [ ] | undefined } | undefined ,
126
126
override = false
127
127
) {
128
- return new Promise ( function ( resolve , reject ) {
128
+ return new Promise < string [ ] > ( function ( resolve , reject ) {
129
129
// Convert array of files into a string if needed.
130
130
files = Files ( files ) ;
131
131
// Create a string that can be parsed by `run`.
@@ -173,8 +173,8 @@ export const extractArchive =
173
173
options = { } ,
174
174
override = false
175
175
) {
176
- return when . promise ( function (
177
- resolve : ( value : any ) => void ,
176
+ return when . promise < string [ ] > ( function (
177
+ resolve : ( args : string [ ] ) => void ,
178
178
reject : ( reason : any ) => void ,
179
179
progress : ( arg0 : any ) => any
180
180
) {
@@ -236,8 +236,8 @@ export const fullArchive =
236
236
options = { } ,
237
237
override = false
238
238
) {
239
- return when . promise ( function (
240
- resolve : ( value : any ) => void ,
239
+ return when . promise < string [ ] > ( function (
240
+ resolve : ( args : string [ ] ) => void ,
241
241
reject : ( reason : any ) => void ,
242
242
progress : ( arg0 : any ) => any
243
243
) {
@@ -296,8 +296,8 @@ export const listArchive =
296
296
options : { files ?: string [ ] | undefined } | undefined ,
297
297
override = false
298
298
) {
299
- return when . promise ( function (
300
- resolve : ( value : any ) => void ,
299
+ return when . promise < Record < string , any > > ( function (
300
+ resolve : ( spec : Record < string , any > ) => void ,
301
301
reject : ( reason : any ) => void ,
302
302
progress : ( arg0 : any ) => any
303
303
) {
@@ -424,8 +424,8 @@ export const onlyArchive =
424
424
options = { } ,
425
425
override = false
426
426
) {
427
- return when . promise ( function (
428
- resolve : ( value : any ) => void ,
427
+ return when . promise < string [ ] > ( function (
428
+ resolve : ( args : string [ ] ) => void ,
429
429
reject : ( reason : any ) => void ,
430
430
progress : ( arg0 : any ) => any
431
431
) {
@@ -491,8 +491,8 @@ export const renameArchive =
491
491
options : { } ,
492
492
override = false
493
493
) {
494
- return when . promise ( function (
495
- resolve : ( value : any ) => void ,
494
+ return when . promise < string [ ] > ( function (
495
+ resolve : ( args : string [ ] ) => void ,
496
496
reject : ( reason : any ) => void ,
497
497
progress : ( arg0 : any ) => any
498
498
) {
@@ -550,8 +550,8 @@ export const testArchive =
550
550
( SevenZip . testArchive =
551
551
SevenZip . test =
552
552
function ( filepath : string , options : { } , override = false ) {
553
- return when . promise ( function (
554
- resolve : ( value : any ) => void ,
553
+ return when . promise < string [ ] > ( function (
554
+ resolve : ( args : string [ ] ) => void ,
555
555
reject : ( reason : any ) => void ,
556
556
progress : ( arg0 : any ) => any
557
557
) {
@@ -613,8 +613,8 @@ export const updateArchive =
613
613
options : { } ,
614
614
override = false
615
615
) {
616
- return when . promise ( function (
617
- resolve : ( value : any ) => void ,
616
+ return when . promise < string [ ] > ( function (
617
+ resolve : ( args : string [ ] ) => void ,
618
618
reject : ( reason : any ) => void ,
619
619
progress : ( arg0 : any ) => any
620
620
) {
0 commit comments