Skip to content

JSONPath Tools / @jsonpath-tools/jsonpath / CompletionService

Class: CompletionService

Provides completion items.

Constructors

new CompletionService()

ts
new CompletionService(queryOptions): CompletionService

Parameters

queryOptions

QueryOptions

Query options.

Returns

CompletionService

Methods

provideCompletions()

ts
provideCompletions(
   query, 
   queryArgument, 
   queryArgumentType, 
   position): CompletionItem[]

Provides completion items at the given caret position in the query text.

Parameters

query

Query

Query.

queryArgument

Query argument.

undefined | JSONValue

queryArgumentType

DataType

Query argument type.

position

number

Caret position in the query text (starts with 0).

Returns

CompletionItem[]