* Registers new capabilities. This can only be called before connecting to a transport. * * The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization).
(capabilities: ClientCapabilities)
| 316 | * The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization). |
| 317 | */ |
| 318 | public registerCapabilities(capabilities: ClientCapabilities): void { |
| 319 | if (this.transport) { |
| 320 | throw new Error('Cannot register capabilities after connecting to transport'); |
| 321 | } |
| 322 | |
| 323 | this._capabilities = mergeCapabilities(this._capabilities, capabilities); |
| 324 | } |
| 325 | |
| 326 | /** |
| 327 | * Override request handler registration to enforce client-side validation for elicitation. |
no test coverage detected