Skip to main content
Branch: Release Candidate

off

Callable

  • off<K>(eventName: K, listener: (...args: Parameters<K extends keyof IClientEvent ? IClientEvent[K] : K extends never ? ICustomEmitEvent[K] : never>) => void): void
  • off<K>(eventName: Exclude<K, keyof IClientEvent>, 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 IClientEvent