Options
All
  • Public
  • Public/Protected
  • All
Menu

The data model backing a code completer widget.

Hierarchy

  • IDisposable
    • IModel

Implemented by

Index

Properties

current

current: ITextState | null

The current text state details.

cursor

cursor: ICursorSpan | null

The cursor details that the API has used to return matching options.

Readonly isDisposed

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

original

original: ITextState | null

The original completer request details.

query

query: string

The query against which items are filtered.

Readonly stateChanged

stateChanged: ISignal<IModel, void>

A signal emitted when state of the completer menu changes.

subsetMatch

subsetMatch: boolean

A flag that is true when the model value was modified by a subset match.

Methods

Optional completionItems

completionItems:

createPatch

  • createPatch(patch: string): IPatch | undefined
  • Create a resolved patch between the original state and a patch string.

    Parameters

    • patch: string

    Returns IPatch | undefined

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

handleCursorChange

  • Handle a cursor change.

    Parameters

    Returns void

handleTextChange

  • Handle a completion request.

    Parameters

    Returns void

items

  • items(): IIterator<IItem>
  • Get the of visible items in the completer menu.

    Returns IIterator<IItem>

options

  • options(): IIterator<string>
  • Get the unfiltered options in a completer menu.

    Returns IIterator<string>

orderedTypes

  • orderedTypes(): string[]
  • An ordered list of types used for visual encoding.

    Returns string[]

reset

  • reset(hard?: boolean): void
  • Reset the state of the model and emit a state change signal.

    Parameters

    • Optional hard: boolean

      Reset even if a subset match is in progress.

    Returns void

Optional setCompletionItems

setCompletionItems:

setOptions

  • setOptions(options: IterableOrArrayLike<string>, typeMap?: JSONObject): void
  • Set the available options in the completer menu.

    Parameters

    • options: IterableOrArrayLike<string>
    • Optional typeMap: JSONObject

    Returns void

typeMap

  • The map from identifiers (a.b) to their types (function, module, class, instance, etc.).

    Returns TypeMap

Generated using TypeDoc