(prefix, colorFn)
| 145 | */ |
| 146 | const writeColored = |
| 147 | (prefix, colorFn) => |
| 148 | (...args) => { |
| 149 | if (currentCollapsed > 0) return; |
| 150 | clearStatusMessage(); |
| 151 | const str = indent(util.format(...args), prefix, colorFn); |
| 152 | stream.write(`${str}\n`); |
| 153 | writeStatusMessage(); |
| 154 | }; |
| 155 | |
| 156 | /** @type {<T extends unknown[]>(...args: T) => void} */ |
| 157 | const writeGroupMessage = writeColored("<-> ", (str) => c.bold(c.cyan(str))); |
no test coverage detected