INNER CODE UNIT · TypeScript

Child

xiangsx/gpt4free-ts · model/airops/index.ts:40

class Child extends ComChild<Account> {
  public client!: AxiosInstance;
  public ws!: WSS;
  private channelMap: Record<
    string,
    ((event: string, data: string) => void) | null
  > = {};
  constructor(label: string, info: any, options?: ChildOptions) {
    super(label, info, options);
  }

  public setMsgListener(cb: (event: string, data: string) => void) {
    for (const channel in this.channelMap) {
      if (!this.channelMap[channel]) {
        this.channelMap[channel] = cb;
        return channel;
      }
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…