import { EventEmitter } from "events"; import { IOption } from "./kokoroIo"; declare const EventType: { Connect: string; Disconnect: string; Chat: string; Event: string; Error: string; }; declare type EventType = keyof typeof EventType; declare const ActionCableEvent: { Welcome: string; Ping: string; ConfirmSubscription: string; RejectSubscription: string; }; declare type ActionCableEvent = keyof typeof ActionCableEvent; export interface IActionCableMessage { type: ActionCableEvent; identifier?: any; data?: any; } export default class ActionCable extends EventEmitter { private url; private origin; private accessToken; private autoReconnect; private streamTimeoutSec; private retryCount; private retryHandler?; private timeoutHandler?; private websocket?; Event: { Connect: string; Disconnect: string; Chat: string; Event: string; Error: string; }; constructor(option: IOption); connect(autoReconnect?: boolean): void; dispose(): void; on(event: EventType, listener: (...args: any[]) => void): this; send(command: string, data?: any, identifier?: any): void; sendRaw(message: any): void; private onConnect; private onError; private onDisconnect; private readonly waitTime; private onMessage; } export {};