Class Signal<THandler>

Type Parameters

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

Hierarchy

  • Signal

Constructors

  • Type Parameters

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

    Returns Signal<THandler>

Properties

connectionsCount: any
decrementConnectionCount: any
emitDepth: any
hasNewLinks: any
head: any
unsetNewLink: any

Methods

  • Subscribe to this signal.

    Parameters

    • callback: THandler

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

    • Optional order: 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

    • Rest ...args: Parameters<THandler>

    Returns void

  • Parameters

    • collector: Collector<THandler>
    • args: Parameters<THandler>

    Returns void

  • Returns

    The number of connections on this signal.

    Returns number

  • Returns

    true if this signal has connections.

    Returns boolean

Generated using TypeDoc