(method: string, params?: unknown)
| 65 | constructor(private readonly options: RuntimeClientOptions) {} |
| 66 | |
| 67 | async request<T>(method: string, params?: unknown): Promise<T> { |
| 68 | await this.connect() |
| 69 | |
| 70 | const socket = this.socket |
| 71 | if (!socket || socket.readyState !== WebSocket.OPEN) throw new Error("Runtime socket is not connected") |
| 72 | |
| 73 | return this.sendRequest<T>(socket, method, params) |
| 74 | } |
| 75 | |
| 76 | private sendRequest<T>(socket: WebSocket, method: string, params?: unknown): Promise<T> { |
| 77 | const id = this.nextId++ |
nothing calls this directly
no test coverage detected