Skip to content

SPARQL Studio API / Yasqe / LspConnection

Interface: LspConnection

Defined in: sparql-utils/src/languageServers/types.ts:19

Minimal editor/transport-agnostic JSON-RPC connection handed to language-server hooks. Each editor adapts its native client to this: the Monaco MonacoLanguageClient (sendNotification/sendRequest) passes through, the CodeMirror LSPClient (notification/request) is mapped onto it.

Methods

sendNotification()

sendNotification(method, params?): void

Defined in: sparql-utils/src/languageServers/types.ts:21

Send a fire-and-forget JSON-RPC notification.

Parameters

method

string

params?

unknown

Returns

void


sendRequest()

sendRequest<R>(method, params?): Promise<R>

Defined in: sparql-utils/src/languageServers/types.ts:23

Send a JSON-RPC request and resolve with its result (rejects with the JSON-RPC error).

Type Parameters

R

R = unknown

Parameters

method

string

params?

unknown

Returns

Promise<R>