bitjs
bitjs copied to clipboard
More semantic event handling for Unarchiver / Archivers
Like was done for commit c3a7b35fd5f864bd91ba15f970447c850e9bc9c6, we could remove all the Unarchive Event sub-classes in archive/events.js and replace them with @typedef data structures and attach to CustomEvents.
I want to do this for two reason:
- It provides a better DX for subscribing to events with methods like onExtract() that the IDE can give hints for. We can keep
addEventListener()around for backwards-compatibility. - It aligns the
archivepackage with theimagepackage.