MCPcopy Create free account
hub / github.com/microsoft/vscode-languageserver-node / sendNotification

Function sendNotification

client/src/client.ts:2354–2365  ·  view source on GitHub ↗
(type: string | RPCMessageType, params?: P)

Source from the content-addressed store, hash-verified

2352 public sendNotification(method: string): void;
2353 public sendNotification(method: string, params: any): void;
2354 public sendNotification<P>(type: string | RPCMessageType, params?: P): void {
2355 if (!this.isConnectionActive()) {
2356 throw new Error('Language client is not ready yet');
2357 }
2358 this.forceDocumentSync();
2359 try {
2360 this._resolvedConnection!.sendNotification(type, params);
2361 } catch (error) {
2362 this.error(`Sending notification ${Is.string(type) ? type : type.method} failed.`, error);
2363 throw error;
2364 }
2365 }
2366
2367 public onNotification<RO>(type: NotificationType0<RO>, handler: NotificationHandler0): void;
2368 public onNotification<P, RO>(type: NotificationType<P, RO>, handler: NotificationHandler<P>): void;

Callers

nothing calls this directly

Calls 2

sendNotificationMethod · 0.65
errorMethod · 0.65

Tested by

no test coverage detected