Skip to content

JSONPath Tools / @jsonpath-tools/jsonpath / DocumentHighlightsService

Class: DocumentHighlightsService

Provides highlights of related symbols.

Constructors

new DocumentHighlightsService()

ts
new DocumentHighlightsService(queryOptions): DocumentHighlightsService

Parameters

queryOptions

QueryOptions

Query options.

Returns

DocumentHighlightsService

Methods

provideHighlights()

ts
provideHighlights(query, position): DocumentHighlight[]

Provides document highlights at the given caret position in the query text.

Parameters

query

Query

Query.

position

number

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

Returns

DocumentHighlight[]