Options
All
  • Public
  • Public/Protected
  • All
Menu

One representation of a notebook output, defined by MIME type and data.

层级

  • NotebookCellOutputItem

索引

Methods(5)

Constructors(1)

Properties(2)

Methods(5)

Static text

  • Factory function to create a NotebookCellOutputItem from a string.

    Note that an UTF-8 encoder is used to create bytes for the string.

    Parameters

    • value: string

      A string.

    • Optional mime: string

      Optional MIME type, defaults to text/plain.

    Returns NotebookCellOutputItem

    A new output item object.

Static json

  • Factory function to create a NotebookCellOutputItem from a JSON object.

    Note that this function is not expecting "stringified JSON" but an object that can be stringified. This function will throw an error when the passed value cannot be JSON-stringified.

    Parameters

    • value: any

      A JSON-stringifyable value.

    • Optional mime: string

      Optional MIME type, defaults to application/json

    Returns NotebookCellOutputItem

    A new output item object.

Static stdout

  • Factory function to create a NotebookCellOutputItem that uses uses the application/vnd.code.notebook.stdout mime type.

    Parameters

    • value: string

      A string.

    Returns NotebookCellOutputItem

    A new output item object.

Static stderr

  • Factory function to create a NotebookCellOutputItem that uses uses the application/vnd.code.notebook.stderr mime type.

    Parameters

    • value: string

      A string.

    Returns NotebookCellOutputItem

    A new output item object.

Static error

  • Factory function to create a NotebookCellOutputItem that uses uses the application/vnd.code.notebook.error mime type.

    Parameters

    • value: Error

      An error object.

    Returns NotebookCellOutputItem

    A new output item object.

Constructors(1)

constructor

  • Create a new notebook cell output item.

    Parameters

    • data: Uint8Array

      The value of the output item.

    • mime: string

      The mime type of the output item.

    Returns NotebookCellOutputItem

Properties(2)

mime

mime: string

The mime type which determines how the data-property is interpreted.

Notebooks have built-in support for certain mime-types, extensions can add support for new types and override existing types.

data

data: Uint8Array

The data of this output item. Must always be an array of unsigned 8-bit integers.

友链:VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场

Generated by TypeDoc. Maintained by 洛竹