Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IConsoleHistory

The definition of a console history manager object.

Hierarchy

  • IDisposable
    • IConsoleHistory

Implemented by

Index

Properties

editor

editor: CodeEditor.IEditor | null

The current editor used by the history widget.

Readonly isDisposed

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

Readonly placeholder

placeholder: string

The placeholder text that a history session began with.

Readonly sessionContext

sessionContext: ISessionContext

The session context used by the foreign handler.

Methods

back

  • back(placeholder: string): Promise<string>
  • Get the previous item in the console history.

    Parameters

    • placeholder: string

      The placeholder string that gets temporarily added to the history only for the duration of one history session. If multiple placeholders are sent within a session, only the first one is accepted.

    Returns Promise<string>

    A Promise for console command text or undefined if unavailable.

dispose

  • dispose(): 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

forward

  • forward(placeholder: string): Promise<string>
  • Get the next item in the console history.

    Parameters

    • placeholder: string

      The placeholder string that gets temporarily added to the history only for the duration of one history session. If multiple placeholders are sent within a session, only the first one is accepted.

    Returns Promise<string>

    A Promise for console command text or undefined if unavailable.

push

  • push(item: string): void
  • Add a new item to the bottom of history.

    Parameters

    • item: string

      The item being added to the bottom of history.

      Notes

      If the item being added is undefined or empty, it is ignored. If the item being added is the same as the last item in history, it is ignored as well so that the console's history will consist of no contiguous repetitions.

    Returns void

reset

  • reset(): void
  • Reset the history navigation state, i.e., start a new history session.

    Returns void

Generated using TypeDoc