Skip to content

Commit

Permalink
Merge pull request #752 from Peeja/patch-3
Browse files Browse the repository at this point in the history
Fix `new JSZip()` and `JSZip#loadAsync` types
  • Loading branch information
Stuk authored Apr 5, 2022
2 parents 2e1e970 + 2808e2e commit 798eefd
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ interface OutputByType {
// compressedContent: string|ArrayBuffer|Uint8Array|Buffer;
// }

type InputFileFormat = InputByType[keyof InputByType];
type InputFileFormat = InputByType[keyof InputByType] | Promise<InputFileFormat>;

declare namespace JSZip {
type InputType = keyof InputByType;
Expand Down Expand Up @@ -266,15 +266,7 @@ interface JSZip {
/**
* Create JSZip instance
*/

/**
* Create JSZip instance
* If no parameters given an empty zip archive will be created
*
* @param data Serialized zip archive
* @param options Description of the serialized zip archive
*/
new (data?: InputFileFormat, options?: JSZip.JSZipLoadOptions): this;
new(): this;

(): JSZip;

Expand Down

0 comments on commit 798eefd

Please sign in to comment.