Skip to content

JSONPath Tools / @jsonpath-tools/jsonpath / TooltipService

Class: TooltipService ​

Provides tooltips with information about query parts.

Constructors ​

Constructor ​

ts
new TooltipService(queryOptions): TooltipService;

Parameters ​

queryOptions ​

QueryOptions

Query options.

Returns ​

TooltipService

Methods ​

provideTooltip() ​

ts
provideTooltip(
   query, 
   queryArgument, 
   queryArgumentType, 
   position): Tooltip | null;

Provides a tooltip at the given position in the query text.

Parameters ​

query ​

Query

Query.

queryArgument ​

JSONValue | undefined

Query argument.

queryArgumentType ​

DataType

Query argument type.

position ​

number

Position in the query text (character index).

Returns ​

Tooltip | null