Function createDisposableListener
- createDisposableListener<K>(emitter, signal, handler, collection): void
Parameters
- emitter: EventEmitter<DefaultEventMap>
- signal: string
- handler: ((event, ...args) => unknown)
- (event, ...args): unknown
Parameters
- event: K
Rest
...args: unknown[]
Returns unknown
- collection: DisposableCollection
Returns void
- createDisposableListener<K>(emitter, signal, handler): Disposable
Parameters
- emitter: EventEmitter<DefaultEventMap>
- signal: string
- handler: ((event, ...args) => unknown)
- (event, ...args): unknown
Parameters
- event: K
Rest
...args: unknown[]
Returns unknown
If a collection is passed in, the new disposable is added to that collection. Otherwise, the new disposable is returned.