src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.ts/serializeCellOutput
function serializeCellOutput(output: IOutputDto): ISerializedCellOutput {
	return {
		outputId: output.outputId,
		outputs: output.outputs.map(ot => ({
			mime: ot.mime,
			data: ot.data.buffer ? Array.from(ot.data.buffer) : []
		})),
		metadata: output.metadata
	};
}