Skip to content

Commit 798eefd

Browse files
authored
Merge pull request #752 from Peeja/patch-3
Fix `new JSZip()` and `JSZip#loadAsync` types
2 parents 2e1e970 + 2808e2e commit 798eefd

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

index.d.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ interface OutputByType {
5656
// compressedContent: string|ArrayBuffer|Uint8Array|Buffer;
5757
// }
5858

59-
type InputFileFormat = InputByType[keyof InputByType];
59+
type InputFileFormat = InputByType[keyof InputByType] | Promise<InputFileFormat>;
6060

6161
declare namespace JSZip {
6262
type InputType = keyof InputByType;
@@ -266,15 +266,7 @@ interface JSZip {
266266
/**
267267
* Create JSZip instance
268268
*/
269-
270-
/**
271-
* Create JSZip instance
272-
* If no parameters given an empty zip archive will be created
273-
*
274-
* @param data Serialized zip archive
275-
* @param options Description of the serialized zip archive
276-
*/
277-
new (data?: InputFileFormat, options?: JSZip.JSZipLoadOptions): this;
269+
new(): this;
278270

279271
(): JSZip;
280272

0 commit comments

Comments
 (0)