Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Signal<CB>

Type parameters

  • CB: Function

Hierarchy

  • Signal

Index

Constructors

constructor

  • new Signal<CB>(): Signal<CB>
  • Create a new signal.

    Type parameters

    • CB: Function

    Returns Signal<CB>

Properties

Readonly emit

emit: CB

Publish this signal event (call all handlers).

function

Private emitDepth

emitDepth: any

Private emitInternal

emitInternal: any

Private hasNewLinks

hasNewLinks: any

Private Readonly head

head: any

Private unsetNewLink

unsetNewLink: any

Methods

connect

  • Subscribe to this signal.

    Parameters

    • callback: CB

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

    • Optional order: number

      Handlers with a higher order value will be called later.

    Returns SignalConnection

disconnect

  • disconnect(callback: CB): boolean
  • 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: CB

      The callback you passed to connect().

    Returns boolean

disconnectAll

  • disconnectAll(): void
  • Disconnect all handlers from this signal event.

    Returns void

Protected emitCollecting

  • emitCollecting<RT>(collector: Collector<CB, RT>, args: any): void
  • Type parameters

    • RT

    Parameters

    Returns void

Generated using TypeDoc