Options
All
  • Public
  • Public/Protected
  • All
Menu

Module nbformat

A namespace for nbformat interfaces.

Index

Type aliases

CellType

CellType: "code" | "markdown" | "raw"

A type which describes the type of cell.

ExecutionCount

ExecutionCount: number | null

The code cell's prompt number. Will be null if the cell has not been run.

ICell

A cell union type.

ICellMetadata

A union metadata type.

IOutput

An output union type.

MultilineString

MultilineString: string | string[]

A multiline string.

OutputMetadata

OutputMetadata: JSONObject

Cell output metadata.

OutputType

OutputType: "execute_result" | "display_data" | "stream" | "error" | "update_display_data"

The valid output types.

StreamType

StreamType: "stdout" | "stderr"

An alias for a stream type.

Variables

Const MAJOR_VERSION

MAJOR_VERSION: number = 4

The major version of the notebook format.

Const MINOR_VERSION

MINOR_VERSION: number = 4

The minor version of the notebook format.

Functions

isCode

  • isCode(cell: ICell): boolean
  • Test whether a cell is a code cell.

    Parameters

    Returns boolean

isDisplayData

  • isDisplayData(output: IOutput): boolean
  • Test whether an output is from display data.

    Parameters

    Returns boolean

isDisplayUpdate

  • isDisplayUpdate(output: IOutput): boolean
  • Test whether an output is from updated display data.

    Parameters

    Returns boolean

isError

  • isError(output: IOutput): boolean

isExecuteResult

  • isExecuteResult(output: IOutput): boolean
  • Test whether an output is an execute result.

    Parameters

    Returns boolean

isMarkdown

  • isMarkdown(cell: ICell): boolean
  • Test whether a cell is a markdown cell.

    Parameters

    Returns boolean

isRaw

  • isRaw(cell: ICell): boolean
  • Test whether a cell is a raw cell.

    Parameters

    Returns boolean

isStream

  • isStream(output: IOutput): boolean
  • Test whether an output is from a stream.

    Parameters

    Returns boolean

validateMimeValue

  • validateMimeValue(type: string, value: MultilineString | JSONObject): boolean
  • Validate a mime type/value pair.

    Parameters

    • type: string

      The mimetype name.

    • value: MultilineString | JSONObject

      The value associated with the type.

    Returns boolean

    Whether the type/value pair are valid.

Generated using TypeDoc