JSONPath Tools / @jsonpath-tools/jsonpath / CompletionItem
Class: CompletionItem
Completion item.
Constructors
new CompletionItem()
new CompletionItem(
type,
text,
range,
label,
detail?,
resolveDescription?,
textType?): CompletionItemParameters
type
Type.
text
string
Text to be inserted instead of range.
When textType is CompletionItemTextType.snippet it should be inserted as a snippet. Snippet parts are defined using ${}, for example ${start}:${end}:${step}.
range
Text range to be replaced with text.
label
string = text
Text to display in user interface.
detail?
string
Additional text to show next to label in user interface. For example a type.
resolveDescription?
() => string
Function that computes the long description. In Markdown format.
textType?
CompletionItemTextType = CompletionItemTextType.plain
Whether the text should be inserted as is or as a snippet.
Returns
CompletionItem
Properties
detail?
readonly optional detail: string;Additional text to show next to label in user interface. For example a type.
label
readonly label: string = text;Text to display in user interface.
range
readonly range: TextRange;Text range to be replaced with text.
resolveDescription()?
readonly optional resolveDescription: () => string;Function that computes the long description. In Markdown format.
Returns
string
text
readonly text: string;Text to be inserted instead of range.
When textType is CompletionItemTextType.snippet it should be inserted as a snippet. Snippet parts are defined using ${}, for example ${start}:${end}:${step}.
textType
readonly textType: CompletionItemTextType = CompletionItemTextType.plain;Whether the text should be inserted as is or as a snippet.
type
readonly type: CompletionItemType;Type.