# Class BaseEmitter<TParams, TEventData>

#### Type Parameters

- #### TParams extends BaseParams = BaseParams

- #### TEventData extends EventData = EventData

#### Hierarchy

- Base<TParams>
  - BaseEmitter
    - ProxyModule
    - AbstractModule

#### Implements

- EventFunctions<TEventData>

- Defined in modules/packages/module/packages/abstract/dist/types/BaseEmitter.d.ts:3

#####
Index

### Constructors

constructor

### Properties

eventData
events
params
defaultLogger?

### Accessors

logger

### Methods

clearListeners
emit
emitSerial
listenerCount
off
offAny
on
onAny
once

## Constructors

### constructor

- new BaseEmitter<TParams, TEventData>(params): BaseEmitter<TParams, TEventData>

- #### Type Parameters

  - #### TParams extends BaseParamsFields = BaseParamsFields

  - #### TEventData extends EventData = EventData

  #### Parameters

  - ##### params: TParams

  #### Returns BaseEmitter<TParams, TEventData>

  Overrides Base<TParams>.constructor

  - Defined in modules/packages/module/packages/abstract/dist/types/BaseEmitter.d.ts:6

## Properties

### eventData

eventData: TEventData

Implementation of EventFunctions.eventData

- Defined in modules/packages/module/packages/abstract/dist/types/BaseEmitter.d.ts:4

### `Private` events

events: any

- Defined in modules/packages/module/packages/abstract/dist/types/BaseEmitter.d.ts:5

### `Readonly` params

params: TParams

Inherited from Base.params

- Defined in protocol/packages/core/dist/types/lib/Base.d.ts:20

### `Static` `Optional` defaultLogger

defaultLogger?: Logger

Inherited from Base.defaultLogger

- Defined in protocol/packages/core/dist/types/lib/Base.d.ts:21

## Accessors

### `Protected` logger

- get logger(): Logger | Console

- #### Returns Logger | Console

  Inherited from Base.logger

  - Defined in protocol/packages/core/dist/types/lib/Base.d.ts:23

## Methods

### clearListeners

- clearListeners(eventNames): void

- #### Parameters

  - ##### eventNames: keyof TEventData | (keyof TEventData)[]

  #### Returns void

  Implementation of EventFunctions.clearListeners

  - Defined in modules/packages/module/packages/abstract/dist/types/BaseEmitter.d.ts:7

### emit

- emit<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>

- #### Type Parameters

  - #### TEventName extends string | number | symbol = keyof TEventData

  - #### TEventArgs extends EventArgs = TEventData[TEventName]

  #### Parameters

  - ##### eventName: TEventName

  - ##### eventArgs: TEventArgs

  #### Returns Promise<void>

  Implementation of EventFunctions.emit

  - Defined in modules/packages/module/packages/abstract/dist/types/BaseEmitter.d.ts:8

### emitSerial

- emitSerial<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>

- #### Type Parameters

  - #### TEventName extends string | number | symbol = keyof TEventData

  - #### TEventArgs extends EventArgs = TEventData[TEventName]

  #### Parameters

  - ##### eventName: TEventName

  - ##### eventArgs: TEventArgs

  #### Returns Promise<void>

  Implementation of EventFunctions.emitSerial

  - Defined in modules/packages/module/packages/abstract/dist/types/BaseEmitter.d.ts:9

### listenerCount

- listenerCount(eventNames): number

- #### Parameters

  - ##### eventNames: keyof TEventData | (keyof TEventData)[]

  #### Returns number

  Implementation of EventFunctions.listenerCount

  - Defined in modules/packages/module/packages/abstract/dist/types/BaseEmitter.d.ts:10

### off

- off<TEventName>(eventNames, listener): void

- #### Type Parameters

  - #### TEventName extends string | number | symbol

  #### Parameters

  - ##### eventNames: TEventName | TEventName[]

  - ##### listener: EventListener<TEventData[TEventName]>

  #### Returns void

  Implementation of EventFunctions.off

  - Defined in modules/packages/module/packages/abstract/dist/types/BaseEmitter.d.ts:11

### offAny

- offAny(listener): void

- #### Parameters

  - ##### listener: EventAnyListener<EventArgs>

  #### Returns void

  Implementation of EventFunctions.offAny

  - Defined in modules/packages/module/packages/abstract/dist/types/BaseEmitter.d.ts:12

### on

- on<TEventName>(eventNames, listener): (() => void)

- #### Type Parameters

  - #### TEventName extends string | number | symbol

  #### Parameters

  - ##### eventNames: TEventName | TEventName[]

  - ##### listener: EventListener<TEventData[TEventName]>

  #### Returns (() => void)

  - - (): void

    - #### Returns void

  Implementation of EventFunctions.on

  - Defined in modules/packages/module/packages/abstract/dist/types/BaseEmitter.d.ts:13

### onAny

- onAny(listener): (() => void)

- #### Parameters

  - ##### listener: EventAnyListener<EventArgs>

  #### Returns (() => void)

  - - (): void

    - #### Returns void

  Implementation of EventFunctions.onAny

  - Defined in modules/packages/module/packages/abstract/dist/types/BaseEmitter.d.ts:14

### once

- once<TEventName>(eventName, listener): (() => void)

- #### Type Parameters

  - #### TEventName extends string | number | symbol

  #### Parameters

  - ##### eventName: TEventName

  - ##### listener: EventListener<TEventData[TEventName]>

  #### Returns (() => void)

  - - (): void

    - #### Returns void

  Implementation of EventFunctions.once

  - Defined in modules/packages/module/packages/abstract/dist/types/BaseEmitter.d.ts:15

Generated using TypeDoc