Interface ICodeCellModel

The definition of a code cell.

Hierarchy

Implemented by

Properties

contentChanged: ISignal<ICellModel, void>

A signal emitted when the content of the model changes.

executionCount: number

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

id: string

A unique identifier for the cell.

isDirty: boolean

Whether the code cell has been edited since the last run.

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

metadata: Omit<IBaseCellMetadata, "trusted">

The metadata associated with the cell.

Notes

This is a copy of the metadata. Changing a part of it won't affect the model. As this returns a copy of all metadata, it is advised to use getMetadata to speed up the process of getting a single key.

metadataChanged: ISignal<ICellModel, IMapChange<any>>

Signal emitted when cell metadata changes.

mimeType: string

A mime type of the model.

Notes

It is never null, the default mime type is text/plain.

mimeTypeChanged: ISignal<IModel, IChangedArgs<string, string, string>>

A signal emitted when a property changes.

The cell outputs.

selections: IObservableMap<ITextSelection[]>

The currently selected code.

sharedModel: ISharedCodeCell

The code cell shared model

stateChanged: ISignal<ICellModel, IChangedArgs<boolean, boolean, any>>

A signal emitted when a model state changes.

trusted: boolean

Whether the cell is trusted.

type: "code"

The type of the cell.

Notes

This is a read-only property.

Methods

  • Clear execution, outputs, and related metadata

    Returns void

  • Delete a metadata.

    Parameters

    • key: string

      Metadata key

    Returns void

  • Dispose of the resources held by the object.

    Notes

    If the object's dispose method is called more than once, all calls made after the first will be a no-op.

    Undefined Behavior

    It is undefined behavior to use any functionality of the object after it has been disposed unless otherwise explicitly noted.

    Returns void

  • Get a metadata

    Notes

    This returns a copy of the key value.

    Parameters

    • key: string

      Metadata key

    Returns any

  • Set a metadata

    Parameters

    • key: string

      Metadata key

    • value: any

      Metadata value

    Returns void

Generated using TypeDoc