* Renders the given text as error text. * @param error Error text to render.
(error)
| 19 | * @param error Error text to render. |
| 20 | */ |
| 21 | static error(error) { |
| 22 | if (typeof error === 'string') { |
| 23 | return `\x1b[31;1m${error}\x1b[0m`; |
| 24 | } |
| 25 | else { |
| 26 | return `\x1b[31;1m${error.message}\x1b[0m`; |
| 27 | } |
| 28 | } |
| 29 | /** |
| 30 | * Renders the given text with a highlight to call attention. |
| 31 | * @param message Text to highlight. |