import { AppEventToken } from "../../main/app/types"; import { WebSocket } from "ws"; import { WSEventProp } from "@narraleaf/shared"; export declare class Client> { private url; ws: WebSocket | null; private _id; constructor(url: string); static construct>(host: string, port: number): Client; connect(): this; onMessage(type: U, callback: (data: T[U]["data"]) => void): AppEventToken; onReply(type: U, replyId: string, callback: (data: T[U]["response"]) => void): AppEventToken; send(type: U, data: T[U]["data"]): void; close(): void; fetch(type: U, data: T[U]["data"]): Promise; forSocketToOpen(): Promise; }