SealedOptionalcontext: anyCalls each of the listeners registered for a given event.
Return an array listing the events for which the emitter has registered listeners.
Return the number of listeners listening to a given event.
Return the listeners registered for a given event.
Optionalfn: (Optionalcontext: anyOptionalonce: booleanAdd a listener for a given event.
Optionalcontext: anyAdd a one-time listener for a given event.
Optionalcontext: anyRemove all listeners, or those of the specified event.
Optionalevent: keyof InvitationListenerEventsRemove the listeners of a given event.
Optionalfn: (Optionalcontext: anyOptionalonce: booleanSubscribes to invitation events on the underlying socket. Called by Salt.listenToOrganisationInvitations after construction; you only need to call it again after a matching stop to resume listening. Idempotent — calling while already started is a no-op.
Stop listening for invitations. Unsubscribes without closing the underlying websocket — call Salt.disconnect to close the socket and allow the Node.js process to exit.
Listens for organisation invitations issued to the authenticated user, a client learns of one as it happens instead of always polling with Salt.getOrganisationsInvitations.
Obtain one via Salt.listenToOrganisationInvitations.
Example