| 703 | // Writer implementations |
| 704 | |
| 705 | class CharacterCodeWriter implements Writer { |
| 706 | options: RawWriteHandler; |
| 707 | isatty: boolean; |
| 708 | |
| 709 | constructor(options: RawWriteHandler) { |
| 710 | this.options = options; |
| 711 | this.isatty = !!options.isatty; |
| 712 | } |
| 713 | |
| 714 | write(buffer: Uint8Array) { |
| 715 | for (let i of buffer) { |
| 716 | this.options.raw(i); |
| 717 | } |
| 718 | return buffer.length; |
| 719 | } |
| 720 | |
| 721 | getTerminalSize() { |
| 722 | return this.options.getTerminalSize?.(); |
| 723 | } |
| 724 | } |
| 725 | |
| 726 | class StringWriter implements Writer { |
| 727 | out: (a: string) => void; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…