electron-toolkit icon indicating copy to clipboard operation
electron-toolkit copied to clipboard

feat(typed-ipc): main process `IpcListener` cleanup functions

Open psychedelicious opened this issue 10 months ago • 0 comments

Description

The main process IpcListener now returns cleanup functions for its on and handle methods which remove the registered listener or handler.

Its dispose method now unsubscribes only listeners and handlers registered with this class instance.

Closes https://github.com/alex8088/electron-toolkit/issues/19

Additional context

I added vitest and tests for the main process's IpcListener.

I'll add some notes to the code.


What is the purpose of this pull request?

  • [ ] Bug fix
  • [x] New Feature
  • [ ] Documentation update
  • [ ] Other

Before submitting the PR, please make sure you do the following

psychedelicious avatar Dec 08 '24 07:12 psychedelicious