index.d.ts 351 B

1234567891011
  1. import { CbEvents } from "../constants";
  2. import { WsResponse } from "../types";
  3. declare type Cbfn = (data: WsResponse) => void;
  4. declare class Emitter {
  5. private events;
  6. constructor();
  7. emit(event: CbEvents, data: WsResponse): this;
  8. on(event: CbEvents, fn: Cbfn): this;
  9. off(event: CbEvents, fn: Cbfn): this;
  10. }
  11. export default Emitter;