Skip to main content
Branch: Release Candidate

off

Callable

  • off<K>(eventName: K, listener: (...args: Parameters<K extends keyof IServerEvent ? IServerEvent[K] : K extends never ? ICustomEmitEvent[K] : never>) => void): void
  • off<K>(eventName: Exclude<K, keyof IServerEvent>, listener: (...args: any[]) => void): void

  • Unsubscribes from a event with the specified listener.

    Remarks

    Listener should be of the same reference as when event was subscribed to.


    Type parameters

    • K: keyof IServerEvent