(output: CommandOutput)
| 73 | } |
| 74 | |
| 75 | export function stringifyOutput(output: CommandOutput): string { |
| 76 | switch (output.kind) { |
| 77 | case 'raw': |
| 78 | return output.data |
| 79 | case 'table': |
| 80 | return stringifyTableOutput(output) |
| 81 | case 'formatted': |
| 82 | return stringifyFormattedOutput(output) |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | function stringifyFormattedOutput(output: FormattedOutput<FormattedPrintable>): string { |
| 87 | switch (output.format) { |