(symbol?: string)
| 128 | } |
| 129 | |
| 130 | private log(symbol?: string): void { |
| 131 | const symbolPrefix = |
| 132 | typeof symbol === 'string' && symbol.length > 0 ? `${symbol} ` : ''; |
| 133 | const trimmedText = this.text.replace(/\n+$/, ''); |
| 134 | const line = `${this.prefixText}${symbolPrefix}${trimmedText}`; |
| 135 | if (line === this.lastLoggedLine) return; |
| 136 | this.lastLoggedLine = line; |
| 137 | this.stream.write(`${line}\n`); |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | export const createSpinner = ( |
no test coverage detected