({ enabled, unicode })
| 475 | } |
| 476 | |
| 477 | load ({ enabled, unicode }) { |
| 478 | this.#enabled = enabled |
| 479 | this.#spinner = unicode ? Progress.dots : Progress.lines |
| 480 | // Wait 200 ms so we don't render the spinner for short durations |
| 481 | this.#timeout = setTimeout(() => { |
| 482 | this.#timeout = null |
| 483 | this.#render() |
| 484 | }, 200) |
| 485 | // Make sure this timeout does not keep the process open |
| 486 | this.#timeout.unref() |
| 487 | } |
| 488 | |
| 489 | off () { |
| 490 | if (!this.#enabled) { |
nothing calls this directly
no test coverage detected