Skip to content

lspeasy / core/src / NotificationMessage

Interface: NotificationMessage

Defined in: packages/core/src/jsonrpc/messages.ts:61

JSON-RPC 2.0 Notification message — no response is expected or sent.

Remarks

Notifications are fire-and-forget. Sending an error response to a notification violates the JSON-RPC 2.0 spec and will be silently dropped by compliant clients.

Never

NEVER send a notification before the initialize response has been sent by the server. The LSP spec requires the server to respond to initialize before any other message is exchanged; clients discard early notifications.

Extends

Properties

PropertyTypeDescriptionOverridesDefined in
jsonrpc"2.0"JSON-RPC protocol version — always "2.0" (inherited).BaseMessage.jsonrpcpackages/core/src/jsonrpc/messages.ts:65
methodstringLSP method string, e.g. 'textDocument/didOpen'.-packages/core/src/jsonrpc/messages.ts:63
params?unknownOptional notification parameters (method-specific shape).-packages/core/src/jsonrpc/messages.ts:67

Released under the MIT License.