Skip to content

JSONPath Tools / @jsonpath-tools/codemirror-lang-jsonpath / LanguageServiceBackend

Class: LanguageServiceBackend ​

Serves as a backend for a language service providing services for editors.

Constructors ​

Constructor ​

ts
new LanguageServiceBackend(sendToFrontend, resolveFunctionHandler?): LanguageServiceBackend;

Parameters ​

sendToFrontend ​

(data) => void

Callback that sends a given data to the frontend.

resolveFunctionHandler? ​

(functionName) => FunctionHandler

Callback that returns a handler for the given function name.

Returns ​

LanguageServiceBackend

Methods ​

receiveFromFrontend() ​

ts
receiveFromFrontend(data): void;

Receives the given data from the frontend.

Parameters ​

data ​

JSONValue

Data.

Returns ​

void