Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add null type to currentFile in JSZipMetadata #851



Copy link

@emilbonnek emilbonnek commented Jul 19, 2022

I think this was supposed to be done as part of PR #826.

At the moment OnUpdateCallback and Metadata are not exported so I had to rely on JSZip.JSZipMetadata for a typesafe onUpdate callback to generateAsync. However, JSZip.JSZipMetadata isn't exactly identical to Metadata as Metadata has a union type that allows currentfile to be null. I see this was added in PR #826 , but shouldn't it be added to both types?

Copy link

Stuk commented Jul 20, 2022

I think it would be better to combine those types. I've made #852, could you take a look and see if that would fix the issue?

Copy link

emilbonnek commented Jul 21, 2022

Yes, you are right - that is a much nicer solution.
I am closing this.

@emilbonnek emilbonnek closed this Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants