()
| 201 | } |
| 202 | |
| 203 | async *#decodeSequence(): AsyncGenerator<CborStreamOutput> { |
| 204 | while (true) { |
| 205 | const value = await this.#read(1, false); |
| 206 | if (value == undefined) return; |
| 207 | // Since `value` is only 1 byte long, it will be of type `number` |
| 208 | const x = await this.#decode(arrayToNumber(value.buffer, true) as number); |
| 209 | if (x instanceof Array) { |
| 210 | yield x[0]; |
| 211 | await x[1]; |
| 212 | } else yield x; |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | #decode( |
| 217 | byte: number, |
no test coverage detected