* Sends all the pending actions to the associated `stream` and clears the * internal list of pending actions. * @returns {Promise } Resolves when all pending actions have been * flushed to the associated `stream`.
()
| 122 | * flushed to the associated `stream`. |
| 123 | */ |
| 124 | commit() { |
| 125 | return new Promise((resolve) => { |
| 126 | this.#stream.write(ArrayPrototypeJoin(this.#todo, ''), resolve); |
| 127 | this.#todo = []; |
| 128 | }); |
| 129 | } |
| 130 | |
| 131 | /** |
| 132 | * Clears the internal list of pending actions without sending it to the |
no test coverage detected