import { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, MessageType as RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport } from 'vscode-jsonrpc'; export { ErrorCodes, ResponseError, CancellationToken, CancellationTokenSource, Disposable, Event, Emitter, Trace, Tracer, TraceFormat, TraceOptions, SetTraceNotification, LogTraceNotification, Message, NotificationMessage, RequestMessage, RPCMessageType, RequestType, RequestType0, RequestHandler, RequestHandler0, GenericRequestHandler, StarRequestHandler, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport, }; export * from 'vscode-languageserver-types'; export * from './protocol'; export { FoldingRangeParams as FoldingRangeRequestParam } from './protocol'; export declare namespace Proposed { } export interface ProtocolConnection { /** * Sends a request and returns a promise resolving to the result of the request. * * @param type The type of request to sent. * @param token An optional cancellation token. * @returns A promise resolving to the request's result. */ sendRequest(type: RequestType0, token?: CancellationToken): Thenable; /** * Sends a request and returns a promise resolving to the result of the request. * * @param type The type of request to sent. * @param params The request's parameter. * @param token An optional cancellation token. * @returns A promise resolving to the request's result. */ sendRequest(type: RequestType, params: P, token?: CancellationToken): Thenable; /** * Sends a request and returns a promise resolving to the result of the request. * * @param method the request's method name. * @param token An optional cancellation token. * @returns A promise resolving to the request's result. */ sendRequest(method: string, token?: CancellationToken): Thenable; /** * Sends a request and returns a promise resolving to the result of the request. * * @param method the request's method name. * @param params The request's parameter. * @param token An optional cancellation token. * @returns A promise resolving to the request's result. */ sendRequest(method: string, param: any, token?: CancellationToken): Thenable; /** * Installs a request handler. * * @param type The request type to install the handler for. * @param handler The actual handler. */ onRequest(type: RequestType0, handler: RequestHandler0): void; /** * Installs a request handler. * * @param type The request type to install the handler for. * @param handler The actual handler. */ onRequest(type: RequestType, handler: RequestHandler): void; /** * Installs a request handler. * * @param methods The method name to install the handler for. * @param handler The actual handler. */ onRequest(method: string, handler: GenericRequestHandler): void; /** * Sends a notification. * * @param type the notification's type to send. */ sendNotification(type: NotificationType0): void; /** * Sends a notification. * * @param type the notification's type to send. * @param params the notification's parameters. */ sendNotification(type: NotificationType, params?: P): void; /** * Sends a notification. * * @param method the notification's method name. */ sendNotification(method: string): void; /** * Sends a notification. * * @param method the notification's method name. * @param params the notification's parameters. */ sendNotification(method: string, params: any): void; /** * Installs a notification handler. * * @param type The notification type to install the handler for. * @param handler The actual handler. */ onNotification(type: NotificationType0, handler: NotificationHandler0): void; /** * Installs a notification handler. * * @param type The notification type to install the handler for. * @param handler The actual handler. */ onNotification(type: NotificationType, handler: NotificationHandler

): void; /** * Installs a notification handler. * * @param methods The method name to install the handler for. * @param handler The actual handler. */ onNotification(method: string, handler: GenericNotificationHandler): void; /** * Enables tracing mode for the connection. */ trace(value: Trace, tracer: Tracer, sendNotification?: boolean): void; trace(value: Trace, tracer: Tracer, traceOptions?: TraceOptions): void; /** * An event emitter firing when an error occurs on the connection. */ onError: Event<[Error, Message | undefined, number | undefined]>; /** * An event emitter firing when the connection got closed. */ onClose: Event; /** * An event emiiter firing when the connection receives a notification that is not * handled. */ onUnhandledNotification: Event; /** * An event emitter firing when the connection got disposed. */ onDispose: Event; /** * Actively disposes the connection. */ dispose(): void; /** * Turns the connection into listening mode */ listen(): void; } /** * @deprecated Use ProtocolConnection instead. */ export declare type ProtocolConnetion = ProtocolConnection; export declare function createProtocolConnection(reader: MessageReader, writer: MessageWriter, logger: Logger, strategy?: ConnectionStrategy): ProtocolConnection;