(output: IOutput)
| 6 | * Render a Jupyter output to the terminal. |
| 7 | */ |
| 8 | export function renderOutput(output: IOutput): void { |
| 9 | if (isStream(output)) { |
| 10 | renderStreamOutput(output) |
| 11 | } else if (isDisplayData(output) || isExecuteResult(output)) { |
| 12 | renderDataOutput(output) |
| 13 | } else if (isError(output)) { |
| 14 | renderErrorOutput(output) |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | function isStream(output: IOutput): output is IStream { |
| 19 | return output.output_type === 'stream' |
no test coverage detected