import { Message, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, Trace, Tracer, CancellationToken, MessageConnection, MessageSignature } from 'vscode-jsonrpc'; import { InitializeParams, InitializeResult, LogMessageParams, ShowMessageParams, DidChangeConfigurationParams, DidOpenTextDocumentParams, DidChangeTextDocumentParams, DidCloseTextDocumentParams, DidSaveTextDocumentParams, DidChangeWatchedFilesParams, PublishDiagnosticsParams } from 'vscode-languageserver-protocol'; import { OutputChannel } from "./services"; export interface IConnection { listen(): void; sendRequest(type: RequestType0, token?: CancellationToken): Thenable; sendRequest(type: RequestType, params: P, token?: CancellationToken): Thenable; sendRequest(method: string, token?: CancellationToken): Thenable; sendRequest(method: string, param: any, token?: CancellationToken): Thenable; sendRequest(type: string | MessageSignature, ...params: any[]): Thenable; onRequest(type: RequestType0, handler: RequestHandler0): void; onRequest(type: RequestType, handler: RequestHandler): void; onRequest(method: string, handler: GenericRequestHandler): void; onRequest(method: string | MessageSignature, handler: GenericRequestHandler): void; sendNotification(type: NotificationType0): void; sendNotification

(type: NotificationType

, params?: P): void; sendNotification(method: string): void; sendNotification(method: string, params: any): void; sendNotification(method: string | MessageSignature, params?: any): void; onNotification(type: NotificationType0, handler: NotificationHandler0): void; onNotification

(type: NotificationType

, handler: NotificationHandler

): void; onNotification(method: string, handler: GenericNotificationHandler): void; onNotification(method: string | MessageSignature, handler: GenericNotificationHandler): void; trace(value: Trace, tracer: Tracer, sendNotification?: boolean): void; initialize(params: InitializeParams): Thenable; shutdown(): Thenable; exit(): void; onLogMessage(handle: NotificationHandler): void; onShowMessage(handler: NotificationHandler): void; onTelemetry(handler: NotificationHandler): void; didChangeConfiguration(params: DidChangeConfigurationParams): void; didChangeWatchedFiles(params: DidChangeWatchedFilesParams): void; didOpenTextDocument(params: DidOpenTextDocumentParams): void; didChangeTextDocument(params: DidChangeTextDocumentParams): void; didCloseTextDocument(params: DidCloseTextDocumentParams): void; didSaveTextDocument(params: DidSaveTextDocumentParams): void; onDiagnostics(handler: NotificationHandler): void; dispose(): void; end(): void; } export interface ConnectionErrorHandler { (error: Error, message: Message | undefined, count: number | undefined): void; } export interface ConnectionCloseHandler { (): void; } export interface IConnectionProvider { get(errorHandler: ConnectionErrorHandler, closeHandler: ConnectionCloseHandler, outputChannel: OutputChannel | undefined): Thenable; } export declare function createConnection(connection: MessageConnection, errorHandler: ConnectionErrorHandler, closeHandler: ConnectionCloseHandler): IConnection; //# sourceMappingURL=connection.d.ts.map