(data: string | Uint8Array)
| 340 | // ========================================================================== |
| 341 | |
| 342 | write(data: string | Uint8Array): void { |
| 343 | const bytes = typeof data === 'string' ? new TextEncoder().encode(data) : data; |
| 344 | const ptr = this.exports.ghostty_wasm_alloc_u8_array(bytes.length); |
| 345 | new Uint8Array(this.memory.buffer).set(bytes, ptr); |
| 346 | this.exports.ghostty_terminal_write(this.handle, ptr, bytes.length); |
| 347 | this.exports.ghostty_wasm_free_u8_array(ptr, bytes.length); |
| 348 | } |
| 349 | |
| 350 | resize(cols: number, rows: number): void { |
| 351 | if (cols === this._cols && rows === this._rows) return; |
nothing calls this directly
no test coverage detected