Interface INotebookHistory

The definition of a console history manager object.

interface INotebookHistory {
    editor: null | CodeEditor.IEditor;
    isDisposed: boolean;
    kernelSession: string;
    placeholder: string;
    back(activeCell): Promise<undefined | string>;
    dispose(): void;
    forward(activeCell): Promise<undefined | string>;
    reset(): void;
    updateEditor(activeCell, content): void;
}

Hierarchy

Implemented by

Properties

editor: null | CodeEditor.IEditor

The current editor used by the history widget.

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

kernelSession: string

The session number of the current kernel session

placeholder: string

The placeholder text that a history session began with.

Methods

  • Get the previous item in the console history.

    Parameters

    • activeCell: Cell<ICellModel>

      The currently selected Cell in the notebook.

    Returns Promise<undefined | string>

    A Promise for console command text or undefined if unavailable.

  • 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 the next item in the console history.

    Parameters

    • activeCell: Cell<ICellModel>

      The currently selected Cell in the notebook.

    Returns Promise<undefined | string>

    A Promise for console command text or undefined if unavailable.

  • Get the next item in the console history.

    Parameters

    • activeCell: Cell<ICellModel>

      The currently selected Cell in the notebook.

    • content: undefined | string

      the result from back or forward

    Returns void