# Class CMappedEvent<T>

Mapped event listener/emitter, listen to, and trigger events. (for single events use CEvent).

#### Example

    const evt = new CMappedEvent<bool>();
    evt.listen('evt', listener);
    evt.dispatch('evt', true);
    evt.remove('evt', listener);

#### Type Parameters

- #### T

#### Hierarchy

- CMappedEvent

- Defined in events.ts:47

#####
Index

### Constructors

constructor

### Properties

_listeners

### Methods

destroy
dispatch
listen
remove

## Constructors

### constructor

- new CMappedEvent<T>(): CMappedEvent<T>

- #### Type Parameters

  - #### T

  #### Returns CMappedEvent<T>

## Properties

### `Private` _listeners

_listeners: Record<string, ((data?) => void)[]> = {}

- Defined in events.ts:48

## Methods

### destroy

- destroy(): void

- #### Returns void

  - Defined in events.ts:69

### dispatch

- dispatch(evt, data?): void

- #### Parameters

  - ##### evt: string

  - ##### `Optional` data: T

  #### Returns void

  - Defined in events.ts:63

### listen

- listen(evt, fn): void

- #### Parameters

  - ##### evt: string

  - ##### fn: ((data?) => void)

    - - (data?): void

      - #### Parameters

        - ##### `Optional` data: T

        #### Returns void

  - Defined in events.ts:50

### remove

- remove(evt, fn): void

- #### Parameters

  - ##### evt: string

  - ##### fn: ((data?) => void)

    - - (data?): void

      - #### Parameters

        - ##### `Optional` data: T

        #### Returns void

  - Defined in events.ts:59

Generated using TypeDoc