()
| 153 | } |
| 154 | |
| 155 | function readJson<T>(): T { |
| 156 | let i = buffer.indexOf(0xa); |
| 157 | // If we couldn't find a newline, we must have found the end of the buffer |
| 158 | if (i < 0) { |
| 159 | i = buffer.length; |
| 160 | } |
| 161 | |
| 162 | return JSON.parse(decodeUTF8(readBinary(i))) as T; |
| 163 | } |
| 164 | |
| 165 | const envelopeHeader = readJson<BaseEnvelopeHeaders>(); |
| 166 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
no test coverage detected