Classes · @purista/core

GenericEventEmitter

Signature

GenericEventEmitter.ts typescript
class GenericEventEmitter<T>

Constructors

1 entry

constructor

Constructor

constructor.ts typescript
new constructor<T>()

Methods

4 entries

emit

Method

Source
emit.ts typescript
emit<K>(eventName: K, parameter?: T[K]): void

off

Method

Source
off.ts typescript
off<K>(eventName: K, fn: EventReceiver<T[K]>): void

on

Method

Source
on.ts typescript
on<K>(eventName: K, fn: EventReceiver<T[K]>): void

removeAllListeners

Method

Source
removeAllListeners.ts typescript
removeAllListeners(): void