(params: RuntimeInitializeParams, context: RuntimeHandlerContext)
| 451 | } |
| 452 | |
| 453 | private initialize(params: RuntimeInitializeParams, context: RuntimeHandlerContext): RuntimeInitializeResult { |
| 454 | const requestedProtocolVersion = params.protocolVersion |
| 455 | if (typeof requestedProtocolVersion === "number" && requestedProtocolVersion !== this.protocolVersion) { |
| 456 | throw new RuntimeHandlerError( |
| 457 | "unsupported_protocol_version", |
| 458 | `Desktop update required: client protocol ${requestedProtocolVersion} is not compatible with runtime protocol ${this.protocolVersion}.`, |
| 459 | { |
| 460 | clientProtocolVersion: requestedProtocolVersion, |
| 461 | serverProtocolVersion: this.protocolVersion, |
| 462 | } |
| 463 | ) |
| 464 | } |
| 465 | return { |
| 466 | protocolVersion: this.protocolVersion, |
| 467 | serverName: this.serverName, |
| 468 | ...(this.serverVersion ? { serverVersion: this.serverVersion } : {}), |
| 469 | capabilities: this.capabilitiesFor(context.connection), |
| 470 | } |
| 471 | } |
| 472 | |
| 473 | private serverStatus(context: RuntimeHandlerContext): RuntimeInitializeResult & { connectionCount: number } { |
| 474 | return { |
no test coverage detected