(formatted: FormattedError)
| 498 | |
| 499 | // Print a formatted error as a chalk-styled string |
| 500 | export function printFormattedError(formatted: FormattedError): string { |
| 501 | let output = `\n${chalk.red('✖')} ${chalk.bold.red(formatted.title)}\n`; |
| 502 | output += ` ${formatted.message}\n`; |
| 503 | |
| 504 | if (formatted.helpUrl) { |
| 505 | output += `\n ${chalk.cyan('Help:')} ${chalk.underline( |
| 506 | formatted.helpUrl |
| 507 | )}\n`; |
| 508 | } |
| 509 | |
| 510 | if (formatted.suggestion) { |
| 511 | output += `\n ${chalk.yellow('Suggestion:')} ${formatted.suggestion}\n`; |
| 512 | } |
| 513 | |
| 514 | return output; |
| 515 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…