Class PineSharedCompletionState

PineSharedCompletionState class is responsible for managing the state of code completion in Pine Script.

Constructors

Properties

activeArg: null | string | number = null

Holds the active argument for code completion

activeParameter: null | number = null

Holds the active parameter index for code completion

args: any = null

Holds the different args for the current completion

lastArg: boolean = false

Holds the last argument index for code completion

selectedCompletion: undefined | string = undefined

Holds the currently selected completion

sigCompletions: Record<string | number, any> = []

Holds the signature completions

sigCompletionsFlag: boolean = false

A flag indicating whether signature completions are active

Accessors

  • get getActiveArg(): null | string | number
  • Gets the current active argument.

    Returns null | string | number

    The current active argument.

  • get getCompletions(): Record<string | number, any>
  • Gets the current completions object.

    Returns Record<string | number, any>

    The current completions object.

  • get getSelectedCompletion(): undefined | string
  • Gets the currently selected completion.

    Returns undefined | string

    The currently selected completion.

Methods

  • Gets the current last argument.

    Parameters

    • activeParameter: number

    Returns void

    The current last argument.

  • Sets the current signature completions flag.

    Parameters

    • flag: boolean

      The new signature completions flag.

    Returns void

  • Sets the current completions object.

    Parameters

    • completions: Record<string, any>

      The new completions object.

    Returns void

  • Sets the currently selected completion.

    Parameters

    • completion: undefined | string

      The new selected completion.

    Returns void

Generated using TypeDoc