@@ -23,13 +23,6 @@ interface CompressionOptions {
23
23
level : number ;
24
24
}
25
25
26
- interface Metadata {
27
- percent : number ;
28
- currentFile : string | null ;
29
- }
30
-
31
- type OnUpdateCallback = ( metadata : Metadata ) => void ;
32
-
33
26
interface InputByType {
34
27
base64 : string ;
35
28
string : string ;
@@ -71,6 +64,13 @@ declare namespace JSZip {
71
64
72
65
type OutputType = keyof OutputByType ;
73
66
67
+ interface JSZipMetadata {
68
+ percent : number ;
69
+ currentFile : string | null ;
70
+ }
71
+
72
+ type OnUpdateCallback = ( metadata : JSZipMetadata ) => void ;
73
+
74
74
interface JSZipObject {
75
75
name : string ;
76
76
/**
@@ -170,11 +170,6 @@ declare namespace JSZip {
170
170
decodeFileName ?: ( bytes : string [ ] | Uint8Array | Buffer ) => string ;
171
171
}
172
172
173
- interface JSZipMetadata {
174
- percent : number ;
175
- currentFile : string ;
176
- }
177
-
178
173
type DataEventCallback < T > = ( dataChunk : T , metadata : JSZipMetadata ) => void
179
174
type EndEventCallback = ( ) => void
180
175
type ErrorEventCallback = ( error : Error ) => void
@@ -287,7 +282,7 @@ interface JSZip {
287
282
* @param onUpdate The optional function called on each internal update with the metadata.
288
283
* @return The serialized archive
289
284
*/
290
- generateAsync < T extends JSZip . OutputType > ( options ?: JSZip . JSZipGeneratorOptions < T > , onUpdate ?: OnUpdateCallback ) : Promise < OutputByType [ T ] > ;
285
+ generateAsync < T extends JSZip . OutputType > ( options ?: JSZip . JSZipGeneratorOptions < T > , onUpdate ?: JSZip . OnUpdateCallback ) : Promise < OutputByType [ T ] > ;
291
286
292
287
/**
293
288
* Generates a new archive asynchronously
@@ -296,7 +291,7 @@ interface JSZip {
296
291
* @param onUpdate The optional function called on each internal update with the metadata.
297
292
* @return A Node.js `ReadableStream`
298
293
*/
299
- generateNodeStream ( options ?: JSZip . JSZipGeneratorOptions < 'nodebuffer' > , onUpdate ?: OnUpdateCallback ) : NodeJS . ReadableStream ;
294
+ generateNodeStream ( options ?: JSZip . JSZipGeneratorOptions < 'nodebuffer' > , onUpdate ?: JSZip . OnUpdateCallback ) : NodeJS . ReadableStream ;
300
295
301
296
/**
302
297
* Generates the complete zip file with the internal stream implementation
0 commit comments