import { RpgContext } from '@rpgjs/common'; export declare const WebSocketToken = "websocket"; export type SocketQueryValue = string | null | undefined; export type SocketQuery = Record; export type SocketUpdateProperties = { room: string; host?: string; query?: SocketQuery; }; export type WebSocketMode = "standalone" | "mmorpg"; export declare abstract class AbstractWebsocket { protected context: RpgContext; readonly mode?: WebSocketMode; /** Whether the client should render its GUI before opening the first connection. */ readonly deferConnection?: boolean; constructor(context: RpgContext); abstract connection(listeners?: (data: any) => void): Promise; abstract emit(event: string, data: any): void; abstract on(event: string, callback: (data: any) => void): void; abstract off(event: string, callback: (data: any) => void): void; abstract updateProperties(params: SocketUpdateProperties): void; abstract reconnect(listeners?: (data: any) => void): Promise; /** Close the current physical connection when the transport supports it. */ disconnect(): void; }