Class Signal<THandler>

A signal is a way to publish and subscribe to events.

Typeparam

THandler The function signature to be implemented by handlers.

Type Parameters

  • THandler extends ((...args) => any)

Constructors

Methods

  • Unsubscribe from this signal with the original callback instance. While you can use this method, the SignalConnection returned by connect() will not be updated!

    Parameters

    • callback: THandler

      The callback you passed to connect().

    Returns boolean

  • Disconnect all handlers from this signal event.

    Returns void

  • Publish this signal event (call all handlers).

    Parameters

    Returns void

  • Returns number

    The number of connections on this signal.

  • Returns boolean

    true if this signal has connections.