Remove event listeners

Parameters

  1. event: 'config:update' | 'connection:enable' | 'connection:disable'
    The type of event to unsubscribe to messages for.
  2. fn: (payload: unknown) => void
    The event listener that should be unsubscribed.

Returns

void

const listener = () => console.log('connection enabled!')
xkit.on('connection:enable', listener)
// ...
xkit.off('connection:enable', listener)

Removes event listeners that were added with on. See on for more details.