bitjs icon indicating copy to clipboard operation
bitjs copied to clipboard

More semantic event handling for Unarchiver / Archivers

Open codedread opened this issue 1 year ago • 0 comments

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 archive package with the image package.

codedread avatar Jan 25 '24 18:01 codedread