Class Signal<THandler>

Type Parameters

  • THandler extends ((...args: any[]) => any)

Constructors

Methods

  • Subscribe to this signal.

    Parameters

    • callback: THandler

      This callback will be run when emit() is called.

    • Optionalorder: number

      Handlers with a higher order value will be called later.

    Returns SignalConnection

  • 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.