nbtx
Version:
Jupyter Notebook Translators: Transform Jupyter notebook JSON files (*.ipynb) to and from more compact data structures for use in web applications or other contexts where loading component parts (e.g. images, data, etc.) is preferred.
13 lines (12 loc) • 920 B
TypeScript
import type { IOutput } from '@jupyterlab/nbformat';
import type { MinifiedContentCache, MinifiedOutput, MinifyOptions } from './types.js';
/**
* Given a list of nbformat IOutput objects, extract large outputs and cache their content on a separate data structure
*
* @param outputs: List of IOutput objects, including stream, error, execute_result, display_data, and update_display_data types.
* @param outputCache: MinifiedContentCache object for storing large output content
* @param opts:
* maxCharacters - the maximum allowed length for output content to remain in outputs; larger contents will be moved to outputCache
* truncateTo - where applicable, truncated text outputs will remain on the output when the full text is moved to outputCache
*/
export declare function minifyCellOutput(outputs: IOutput[], outputCache: MinifiedContentCache, opts?: Partial<MinifyOptions>): Promise<MinifiedOutput[]>;