Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

EventEmitter

class EventEmitter<T extends Record<string, any>> {
private callbacks;
 
protected emit<EventName extends StringKeyOf<T>>(event: EventName, ...args: CallbackType<T, EventName>): this;
protected removeAllListeners(): void;
off<EventName extends StringKeyOf<T>>(event: EventName, fn?: CallbackFunction<T, EventName>): this;
on<EventName extends StringKeyOf<T>>(event: EventName, fn: CallbackFunction<T, EventName>): this;
}

§Type Parameters

§
T extends Record<string, any>
[src]

§Properties

§
callbacks
[src]

§Methods

§
emit<EventName extends StringKeyOf<T>>(event: EventName, ...args: CallbackType<T, EventName>): this protected
[src]
§
removeAllListeners(): void protected
[src]
§
off<EventName extends StringKeyOf<T>>(event: EventName, fn?: CallbackFunction<T, EventName>): this
[src]
§
on<EventName extends StringKeyOf<T>>(event: EventName, fn: CallbackFunction<T, EventName>): this
[src]