(
items: number | bigint,
)
| 165 | } |
| 166 | |
| 167 | async *#readDefinite( |
| 168 | items: number | bigint, |
| 169 | ): AsyncGenerator<CborStreamOutput> { |
| 170 | items = BigInt(items); |
| 171 | for (let i = 0n; i < items; ++i) { |
| 172 | const x = await this.#decode( |
| 173 | arrayToNumber((await this.#read(1, true)).buffer, true) as number, |
| 174 | ); |
| 175 | if (x instanceof Array) { |
| 176 | yield x[0]; |
| 177 | await x[1]; |
| 178 | } else yield x; |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | async *#readIndefinite( |
| 183 | denyInnerIndefinite: boolean, |
no test coverage detected