Options
All
  • Public
  • Public/Protected
  • All
Menu

Module nbformat

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: PartialJSONObject

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

The earliest major version of the notebook format we support.

Const MINOR_VERSION

MINOR_VERSION: number

The earliest minor version of the notebook format we support.

Functions

isCode

  • Test whether a cell is a code cell.

    Parameters

    Returns cell is ICodeCell

isDisplayData

  • Test whether an output is from display data.

    Parameters

    Returns output is IDisplayData

isDisplayUpdate

  • Test whether an output is from updated display data.

    Parameters

    Returns output is IDisplayUpdate

isError

  • Test whether an output is an error.

    Parameters

    Returns output is IError

isExecuteResult

  • Test whether an output is an execute result.

    Parameters

    Returns output is IExecuteResult

isMarkdown

  • Test whether a cell is a markdown cell.

    Parameters

    Returns cell is IMarkdownCell

isRaw

  • Test whether a cell is a raw cell.

    Parameters

    Returns cell is IRawCell

isStream

  • Test whether an output is from a stream.

    Parameters

    Returns output is IStream

validateMimeValue

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

    Parameters

    • type: string

      The mimetype name.

    • value: MultilineString | PartialJSONObject

      The value associated with the type.

    Returns boolean

    Whether the type/value pair are valid.

Generated using TypeDoc