@amelix/phoenix.js
Version:
A feature-rich API wrapper for the critically acclaimed chatting app Phoenix.. or something.
15 lines (14 loc) • 481 B
TypeScript
export default class EventEmitter {
private callbacks;
private onces;
constructor();
/**
* Choose what happens on a particular event broadcasted by this event emitter.
*/
on(event: string, callback: Function, once?: boolean): void;
/**
* Same as on(), except will only run the first time the event is emitted.
*/
once(event: string, callback: Function): void;
protected emit(event: string, ...args: any[]): void;
}