# Class Emitter

#### Hierarchy (View Summary)

- EventEmitter
  - Emitter
    - Connection
    - Echo
    - Local
    - Multi
    - Pool
    - Relay
    - Relays
    - Tracker
    - Nip46Broker
    - Nip46Receiver
    - Nip46Sender
    - Relay
    - Repository

- Defined in packages/lib/src/Emitter.ts:3

#####
Index

### Constructors

constructor

### Properties

defaultMaxListeners

### Methods

addListener
emit
eventNames
getMaxListeners
listenerCount
listeners
off
on
once
prependListener
prependOnceListener
rawListeners
removeAllListeners
removeListener
setMaxListeners
listenerCount

##
Constructors

### constructor

- new Emitter(): Emitter

- #### Returns Emitter

  Inherited from EventEmitter.constructor

##
Properties

### `Static` defaultMaxListeners

defaultMaxListeners: number

Inherited from EventEmitter.defaultMaxListeners

- Defined in node_modules/@types/events/index.d.ts:5

##
Methods

### addListener

- addListener(type: string | number, listener: Listener): this

- #### Parameters

  - type: string | number
  - listener: Listener

  #### Returns this

  Inherited from EventEmitter.addListener

  - Defined in node_modules/@types/events/index.d.ts:11

### emit

- emit(type: string, ...args: any[]): boolean

- #### Parameters

  - type: string
  - ...args: any[]

  #### Returns boolean

  Overrides EventEmitter.emit

  - Defined in packages/lib/src/Emitter.ts:4

### eventNames

- eventNames(): (string | number)[]

- #### Returns (string | number)[]

  Inherited from EventEmitter.eventNames

  - Defined in node_modules/@types/events/index.d.ts:7

### getMaxListeners

- getMaxListeners(): number

- #### Returns number

  Inherited from EventEmitter.getMaxListeners

  - Defined in node_modules/@types/events/index.d.ts:9

### listenerCount

- listenerCount(type: string | number): number

- #### Parameters

  - type: string | number

  #### Returns number

  Inherited from EventEmitter.listenerCount

  - Defined in node_modules/@types/events/index.d.ts:20

### listeners

- listeners(type: string | number): Listener[]

- #### Parameters

  - type: string | number

  #### Returns Listener[]

  Inherited from EventEmitter.listeners

  - Defined in node_modules/@types/events/index.d.ts:19

### off

- off(type: string | number, listener: Listener): this

- #### Parameters

  - type: string | number
  - listener: Listener

  #### Returns this

  Inherited from EventEmitter.off

  - Defined in node_modules/@types/events/index.d.ts:17

### on

- on(type: string | number, listener: Listener): this

- #### Parameters

  - type: string | number
  - listener: Listener

  #### Returns this

  Inherited from EventEmitter.on

  - Defined in node_modules/@types/events/index.d.ts:12

### once

- once(type: string | number, listener: Listener): this

- #### Parameters

  - type: string | number
  - listener: Listener

  #### Returns this

  Inherited from EventEmitter.once

  - Defined in node_modules/@types/events/index.d.ts:13

### prependListener

- prependListener(type: string | number, listener: Listener): this

- #### Parameters

  - type: string | number
  - listener: Listener

  #### Returns this

  Inherited from EventEmitter.prependListener

  - Defined in node_modules/@types/events/index.d.ts:14

### prependOnceListener

- prependOnceListener(type: string | number, listener: Listener): this

- #### Parameters

  - type: string | number
  - listener: Listener

  #### Returns this

  Inherited from EventEmitter.prependOnceListener

  - Defined in node_modules/@types/events/index.d.ts:15

### rawListeners

- rawListeners(type: string | number): Listener[]

- #### Parameters

  - type: string | number

  #### Returns Listener[]

  Inherited from EventEmitter.rawListeners

  - Defined in node_modules/@types/events/index.d.ts:21

### removeAllListeners

- removeAllListeners(type?: string | number): this

- #### Parameters

  - `Optional` type: string | number

  #### Returns this

  Inherited from EventEmitter.removeAllListeners

  - Defined in node_modules/@types/events/index.d.ts:18

### removeListener

- removeListener(type: string | number, listener: Listener): this

- #### Parameters

  - type: string | number
  - listener: Listener

  #### Returns this

  Inherited from EventEmitter.removeListener

  - Defined in node_modules/@types/events/index.d.ts:16

### setMaxListeners

- setMaxListeners(n: number): this

- #### Parameters

  - n: number

  #### Returns this

  Inherited from EventEmitter.setMaxListeners

  - Defined in node_modules/@types/events/index.d.ts:8

### `Static` listenerCount

- listenerCount(emitter: EventEmitter, type: string | number): number

- #### Parameters

  - emitter: EventEmitter
  - type: string | number

  #### Returns number

  Inherited from EventEmitter.listenerCount

  - Defined in node_modules/@types/events/index.d.ts:4