()
| 771 | // to do feature support detection. This should be done any other way, but for |
| 772 | // now we will just return the first hello seen, which should suffice. |
| 773 | lastHello(): Document { |
| 774 | const serverDescriptions = Array.from(this.description.servers.values()); |
| 775 | if (serverDescriptions.length === 0) return {}; |
| 776 | const sd = serverDescriptions.filter( |
| 777 | (sd: ServerDescription) => sd.type !== ServerType.Unknown |
| 778 | )[0]; |
| 779 | |
| 780 | const result = sd || { maxWireVersion: this.description.commonWireVersion }; |
| 781 | return result; |
| 782 | } |
| 783 | |
| 784 | get commonWireVersion(): number { |
| 785 | return this.description.commonWireVersion; |
no test coverage detected