gildas-lormeau / zip.js

JavaScript library to zip and unzip files supporting multi-core compression, compression streams, zip64, split files and encryption.
https://gildas-lormeau.github.io/zip.js
BSD 3-Clause "New" or "Revised" License
3.38k stars 510 forks source link

Update types of optional dependencies #366

Closed josh- closed 1 year ago

josh- commented 1 year ago

A recent update caused one of my projects to fail TypeScript compilation with the following error:

Failed to compile.
TS2554: Expected 1-2 arguments, but got 0.
    46 |   );
    47 |
  > 48 |   await zipWriter.close();
       |                   ^^^^^^^
    49 |
    50 |   return blobWriter.getData();
    51 | }

I believe this issue is the result of 1dc2835976bbe009646f72b13196af97269bb70d, which I've attempted to address in this PR, by marking such parameters as optional instead of | undefined.

gildas-lormeau commented 1 year ago

Thank you and sorry (again) for the inconvenience. I just published the version 2.6.25 which includes your fix.

josh- commented 1 year ago

No worries at all! Thanks @gildas-lormeau 🙌