(method: string, params?: unknown)
| 142 | } |
| 143 | |
| 144 | function sendNotification(method: string, params?: unknown): void { |
| 145 | const body = JSON.stringify({ |
| 146 | jsonrpc: "2.0", |
| 147 | method, |
| 148 | params, |
| 149 | } satisfies JsonRpcNotification); |
| 150 | const header = `Content-Length: ${Buffer.byteLength(body)}\r\n\r\n`; |
| 151 | process.stdout.write(encoder.encode(header + body)); |
| 152 | } |
| 153 | |
| 154 | function sendResult(id: number, result: unknown): void { |
| 155 | send({ jsonrpc: "2.0", id, result }); |
no outgoing calls
no test coverage detected