1 /// <reference path="../../typings/thenable.d.ts" />
2 /// <reference types="node" />
3 import { Connection, _, _Connection, Features } from '../common/server';
4 import * as fm from './files';
5 import { ConnectionStrategy, ConnectionOptions, MessageReader, MessageWriter } from 'vscode-languageserver-protocol/node';
6 export * from 'vscode-languageserver-protocol/node';
7 export * from '../common/api';
8 export declare namespace Files {
9 let uriToFilePath: typeof fm.uriToFilePath;
10 let resolveGlobalNodePath: typeof fm.resolveGlobalNodePath;
11 let resolveGlobalYarnPath: typeof fm.resolveGlobalYarnPath;
12 let resolve: typeof fm.resolve;
13 let resolveModulePath: typeof fm.resolveModulePath;
16 * Creates a new connection based on the processes command line arguments:
18 * @param options An optional connection strategy or connection options to control additional settings
20 export declare function createConnection(options?: ConnectionStrategy | ConnectionOptions): Connection;
22 * Creates a new connection using a the given streams.
24 * @param inputStream The stream to read messages from.
25 * @param outputStream The stream to write messages to.
26 * @param options An optional connection strategy or connection options to control additional settings
27 * @return a [connection](#IConnection)
29 export declare function createConnection(inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, options?: ConnectionStrategy | ConnectionOptions): Connection;
31 * Creates a new connection.
33 * @param reader The message reader to read messages from.
34 * @param writer The message writer to write message to.
35 * @param options An optional connection strategy or connection options to control additional settings
37 export declare function createConnection(reader: MessageReader, writer: MessageWriter, options?: ConnectionStrategy | ConnectionOptions): Connection;
39 * Creates a new connection based on the processes command line arguments. The new connection surfaces proposed API
41 * @param factories: the factories to use to implement the proposed API
42 * @param options An optional connection strategy or connection options to control additional settings
44 export declare function createConnection<PConsole = _, PTracer = _, PTelemetry = _, PClient = _, PWindow = _, PWorkspace = _, PLanguages = _>(factories: Features<PConsole, PTracer, PTelemetry, PClient, PWindow, PWorkspace, PLanguages>, options?: ConnectionStrategy | ConnectionOptions): _Connection<PConsole, PTracer, PTelemetry, PClient, PWindow, PWorkspace, PLanguages>;
46 * Creates a new connection using a the given streams.
48 * @param inputStream The stream to read messages from.
49 * @param outputStream The stream to write messages to.
50 * @param options An optional connection strategy or connection options to control additional settings
51 * @return a [connection](#IConnection)
53 export declare function createConnection<PConsole = _, PTracer = _, PTelemetry = _, PClient = _, PWindow = _, PWorkspace = _, PLanguages = _>(factories: Features<PConsole, PTracer, PTelemetry, PClient, PWindow, PWorkspace, PLanguages>, inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, options?: ConnectionStrategy | ConnectionOptions): _Connection<PConsole, PTracer, PTelemetry, PClient, PWindow, PWorkspace, PLanguages>;
55 * Creates a new connection.
57 * @param reader The message reader to read messages from.
58 * @param writer The message writer to write message to.
59 * @param options An optional connection strategy or connection options to control additional settings
61 export declare function createConnection<PConsole = _, PTracer = _, PTelemetry = _, PClient = _, PWindow = _, PWorkspace = _, PLanguages = _>(factories: Features<PConsole, PTracer, PTelemetry, PClient, PWindow, PWorkspace, PLanguages>, reader: MessageReader, writer: MessageWriter, options?: ConnectionStrategy | ConnectionOptions): _Connection<PConsole, PTracer, PTelemetry, PClient, PWindow, PWorkspace, PLanguages>;