()
| 2299 | } |
| 2300 | |
| 2301 | end(): void { |
| 2302 | // The carried bytes may also be an invalid sequence, such as a single 0xFF |
| 2303 | if (this.carry !== undefined) { |
| 2304 | this.parser.feed("", true) |
| 2305 | throw this.parser.error("Syntax", "invalid UTF-8", this.parser.received) |
| 2306 | } |
| 2307 | this.parser.end() |
| 2308 | } |
| 2309 | |
| 2310 | private decode(bytes: Uint8Array): void { |
| 2311 | let text: string |