import { Disposable } from "@anz-bank/vscode-sysl-model"; import { ProtocolNotificationType } from "vscode-languageserver-protocol"; import { NotificationSender } from "../views/events"; import { Views } from "../views/types"; /** * Routes events between a plugin and the renderer. * * The router receives plugin events via {@link client} and forwards those that are relevent to the * renderer via {@link views}. Similarly, events emitted by the renderer are received via listeners * in {@link views} and forwarded to the plugin via {@link client} (using a {@link Notifier}). */ export declare class LspPluginClientRouter implements Disposable { private readonly views; private readonly client; private readonly notifier; private readonly subscriptions; constructor(views: Views, client: LanguageClient); start(): Promise; dispose(): void; } /** A non-VS Code-specific interface for language clients. */ export interface LanguageClient extends NotificationSender { start(): Promise; onNotification(type: ProtocolNotificationType, listener: (e: T) => any): void; sendNotification(notificationType: ProtocolNotificationType, payload: T): void; } /** A language client that records interactions. */ export declare class LanguageClientSpy implements LanguageClient { started: boolean; listeners: { [key: string]: ((e: any) => any)[]; }; received: [string, any][]; sent: [string, any][]; acceptNotification(type: ProtocolNotificationType, payload: any): void; onNotification(type: ProtocolNotificationType, listener: (e: any) => any): void; sendNotification(notificationType: ProtocolNotificationType, payload: T): Promise; start(): Promise; }