nicecode-v2/packages/biz/lib/useSocket/ws.d.ts

27 lines
736 B
TypeScript

declare class Channel {
/**
* io 实例化对象
*/
ioIns: any;
/**
* 已存在的订阅列表
*/
listeners: never[];
/**
* 调试信息 记录订阅/反订阅次数
*/
subscribeListenerId: never[];
unSubscribeListenerId: never[];
init: () => void;
retry: (listener: {
[x: string]: any;
lastRetryInterval: number | undefined;
intervalId: NodeJS.Timeout;
} | undefined) => void;
doEmit: (topic: any, req: any, listenerId: any) => void;
subscribe(topic: any, req: any, handle: any): () => void;
unSubscribe(topic: any, req: any, handleId: any, listenerId: any): void;
}
declare const channelIns: Channel;
export default channelIns;