(display: SpinnerDisplay)
| 39 | }; |
| 40 | |
| 41 | const normalizeDisplay = (display: SpinnerDisplay): DisplayOptions | string => { |
| 42 | if (typeof display === 'string') { |
| 43 | return display; |
| 44 | } |
| 45 | |
| 46 | const { prefixText, stream, symbolFormatter, ...spinnerDisplay } = display; |
| 47 | void stream; |
| 48 | |
| 49 | return { |
| 50 | ...spinnerDisplay, |
| 51 | symbolFormatter: withPrefixText(prefixText, symbolFormatter), |
| 52 | }; |
| 53 | }; |
| 54 | |
| 55 | // Animated spinners only render correctly on a TTY, where ANSI cursor |
| 56 | // movement codes can overwrite the previous frame. On non-TTY streams (CI |
no test coverage detected