open-im-sdk-for-cocos
Version:
OpenIM SDK for js extend cocos
12 lines (11 loc) • 375 B
TypeScript
import { CbEvents } from '../constant/callback';
import type { WsResponse } from '../types/entity';
type Cbfn = (data: WsResponse) => void;
declare class Emitter {
private events;
constructor();
emit(event: CbEvents, data: WsResponse): this;
on(event: CbEvents, fn: Cbfn): this;
off(event: CbEvents, fn: Cbfn): this | undefined;
}
export default Emitter;