yazl
yazl copied to clipboard
Documentation: error handling
Hi,
I noticed that you throw errors on the instance of ZipFile
class. So should I catch errors like this?
var zipfile = new yazl.ZipFile();
//...
zipfile.on('error', error=>console.error(error));
This was only way how to prevent termination of the process when for example I tried to add to zip path, that does not exists.
If this is the correct way, could you please add it to documentation? Also if this is the correct way, typing on https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/yazl/index.d.ts does not allow this call.