(method, params)
| 58 | } |
| 59 | |
| 60 | async send(method, params) { |
| 61 | const response = await this.#bidi.send({ method, params }) |
| 62 | if (response?.error !== undefined) { |
| 63 | throw new Error(`${response.error}: ${response.message}`) |
| 64 | } |
| 65 | return response?.result |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * Subscribes `handler` to a BiDi event. All the actual subscription-lifecycle |