Function createDisposableListener

  • Type Parameters

    • K

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • signal: string
    • handler: ((event, ...args) => unknown)
        • (event, ...args): unknown
        • Parameters

          • event: K
          • Rest ...args: unknown[]

          Returns unknown

    • collection: DisposableCollection

      If a collection is passed in, the new disposable is added to that collection. Otherwise, the new disposable is returned.

    Returns void

  • Type Parameters

    • K

    Parameters

    • emitter: EventEmitter<DefaultEventMap>
    • signal: string
    • handler: ((event, ...args) => unknown)
        • (event, ...args): unknown
        • Parameters

          • event: K
          • Rest ...args: unknown[]

          Returns unknown

    Returns Disposable