Class EventEmitter<EventDataMap>
Properties
topics
Methods
dispose
- dispose(): void
Returns void
off
- off<K>(topic, listener?): void
Type Parameters
K extends string | number | symbol
Returns void
on
- on<K>(topic, listener, order?): {
unsub: (() => void);
} Type Parameters
K extends string | number | symbol
Parameters
topic: K
Optional
order: number
Returns {
unsub: (() => void);
}
once
- once<K>(topic, listener, order?): {
unsub: (() => void);
} Type Parameters
K extends string | number | symbol
Parameters
topic: K
Optional
order: number
Returns {
unsub: (() => void);
}
Type-safe version of EventEmitter