vscode-languageserver-protocol
Advanced tools
Comparing version 3.15.0-next.11 to 3.15.0-next.12
@@ -10,15 +10,23 @@ 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, HandlerResult, NotificationType, NotificationType0, NotificationHandler, NotificationHandler0, GenericNotificationHandler, StarNotificationHandler, MessageReader, PartialMessageInfo, MessageWriter, Logger, ConnectionStrategy, StreamMessageReader, StreamMessageWriter, IPCMessageReader, IPCMessageWriter, createClientPipeTransport, createServerPipeTransport, generateRandomPipeName, DataCallback, createClientSocketTransport, createServerSocketTransport, ProgressType, ProgressToken } from 'vscode-jsonrpc'; | ||
type CallHierarchyClientCapabilities = callHierarchy.CallHierarchyClientCapabilities; | ||
type CallHierarchyItem = callHierarchy.CallHierarchyItem; | ||
type CallHierarchyIncomingCall = callHierarchy.CallHierarchyIncomingCall; | ||
type CallHierarchyOutgoingCall = callHierarchy.CallHierarchyOutgoingCall; | ||
type CallHierarchyOptions = callHierarchy.CallHierarchyOptions; | ||
type CallHierarchyRegistrationOptions = callHierarchy.CallHierarchyRegistrationOptions; | ||
type CallHierarchyServerCapabilities = callHierarchy.CallHierarchyServerCapabilities; | ||
namespace CallHierarchyRequest { | ||
const type: RequestType<callHierarchy.CallHierarchyParams, callHierarchy.CallHierarchyCall[], void, callHierarchy.CallHierarchyRegistrationOptions>; | ||
type HandlerSignature = callHierarchy.CallHierarchyRequest.HandlerSignature; | ||
type CallHierarchyPrepareParams = callHierarchy.CallHierarchyPrepareParams; | ||
namespace CallHierarchyPrepareRequest { | ||
const type: RequestType<callHierarchy.CallHierarchyPrepareParams, callHierarchy.CallHierarchyItem[] | null, void, callHierarchy.CallHierarchyRegistrationOptions>; | ||
type HandlerSignature = callHierarchy.CallHierarchyPrepareRequest.HandlerSignature; | ||
} | ||
namespace CallHierarchyDirection { | ||
const CallsFrom: 1; | ||
const CallsTo: 2; | ||
type CallHierarchyIncomingCallsParams = callHierarchy.CallHierarchyIncomingCallsParams; | ||
namespace CallHierarchyIncomingCallsRequest { | ||
const type: typeof callHierarchy.CallHierarchyIncomingCallsRequest; | ||
type HandlerSignature = callHierarchy.CallHierarchyIncomingCallsRequest.HandlerSignature; | ||
} | ||
type CallHierarchyParams = callHierarchy.CallHierarchyParams; | ||
type CallHierarchyDirection = callHierarchy.CallHierarchyDirection; | ||
type CallHierarchyItem = callHierarchy.CallHierarchyItem; | ||
type CallHierarchyCall = callHierarchy.CallHierarchyCall; | ||
type CallHierarchyOutgoingCallsParams = callHierarchy.CallHierarchyOutgoingCallsParams; | ||
namespace CallHierarchyOutgoingCallsRequest { | ||
const type: typeof callHierarchy.CallHierarchyOutgoingCallsRequest; | ||
type HandlerSignature = callHierarchy.CallHierarchyOutgoingCallsRequest.HandlerSignature; | ||
} | ||
type WorkDoneProgressClientCapabilities = progress.WorkDoneProgressClientCapabilities; | ||
@@ -50,3 +58,3 @@ type WorkDoneProgressBegin = progress.WorkDoneProgressBegin; | ||
*/ | ||
sendRequest<R, E, RO>(type: RequestType0<R, E, RO>, token?: CancellationToken): Thenable<R>; | ||
sendRequest<R, E, RO>(type: RequestType0<R, E, RO>, token?: CancellationToken): Promise<R>; | ||
/** | ||
@@ -60,3 +68,3 @@ * Sends a request and returns a promise resolving to the result of the request. | ||
*/ | ||
sendRequest<P, R, E, RO>(type: RequestType<P, R, E, RO>, params: P, token?: CancellationToken): Thenable<R>; | ||
sendRequest<P, R, E, RO>(type: RequestType<P, R, E, RO>, params: P, token?: CancellationToken): Promise<R>; | ||
/** | ||
@@ -69,3 +77,3 @@ * Sends a request and returns a promise resolving to the result of the request. | ||
*/ | ||
sendRequest<R>(method: string, token?: CancellationToken): Thenable<R>; | ||
sendRequest<R>(method: string, token?: CancellationToken): Promise<R>; | ||
/** | ||
@@ -79,3 +87,3 @@ * Sends a request and returns a promise resolving to the result of the request. | ||
*/ | ||
sendRequest<R>(method: string, param: any, token?: CancellationToken): Thenable<R>; | ||
sendRequest<R>(method: string, param: any, token?: CancellationToken): Promise<R>; | ||
/** | ||
@@ -82,0 +90,0 @@ * Installs a request handler. |
@@ -45,11 +45,14 @@ /* -------------------------------------------------------------------------------------------- | ||
(function (Proposed) { | ||
let CallHierarchyRequest; | ||
(function (CallHierarchyRequest) { | ||
CallHierarchyRequest.type = callHierarchy.CallHierarchyRequest.type; | ||
})(CallHierarchyRequest = Proposed.CallHierarchyRequest || (Proposed.CallHierarchyRequest = {})); | ||
let CallHierarchyDirection; | ||
(function (CallHierarchyDirection) { | ||
CallHierarchyDirection.CallsFrom = callHierarchy.CallHierarchyDirection.CallsFrom; | ||
CallHierarchyDirection.CallsTo = callHierarchy.CallHierarchyDirection.CallsTo; | ||
})(CallHierarchyDirection = Proposed.CallHierarchyDirection || (Proposed.CallHierarchyDirection = {})); | ||
let CallHierarchyPrepareRequest; | ||
(function (CallHierarchyPrepareRequest) { | ||
CallHierarchyPrepareRequest.type = callHierarchy.CallHierarchyPrepareRequest.type; | ||
})(CallHierarchyPrepareRequest = Proposed.CallHierarchyPrepareRequest || (Proposed.CallHierarchyPrepareRequest = {})); | ||
let CallHierarchyIncomingCallsRequest; | ||
(function (CallHierarchyIncomingCallsRequest) { | ||
CallHierarchyIncomingCallsRequest.type = callHierarchy.CallHierarchyIncomingCallsRequest; | ||
})(CallHierarchyIncomingCallsRequest = Proposed.CallHierarchyIncomingCallsRequest || (Proposed.CallHierarchyIncomingCallsRequest = {})); | ||
let CallHierarchyOutgoingCallsRequest; | ||
(function (CallHierarchyOutgoingCallsRequest) { | ||
CallHierarchyOutgoingCallsRequest.type = callHierarchy.CallHierarchyOutgoingCallsRequest; | ||
})(CallHierarchyOutgoingCallsRequest = Proposed.CallHierarchyOutgoingCallsRequest || (Proposed.CallHierarchyOutgoingCallsRequest = {})); | ||
// export type ProgressServerCapabilities = progress.ProgressServerCapabilities; | ||
@@ -56,0 +59,0 @@ let WorkDoneProgress; |
import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc'; | ||
import { SymbolKind, Range } from 'vscode-languageserver-types'; | ||
import { SymbolKind, SymbolTag, Range, DocumentUri } from 'vscode-languageserver-types'; | ||
import { TextDocumentRegistrationOptions, StaticRegistrationOptions, TextDocumentPositionParams, PartialResultParams, WorkDoneProgressParams, WorkDoneProgressOptions } from './protocol'; | ||
export interface CallHierarchyItem { | ||
/** | ||
* The name of this item. | ||
*/ | ||
name: string; | ||
/** | ||
* The kind of this item. | ||
*/ | ||
kind: SymbolKind; | ||
/** | ||
* Tags for this item. | ||
*/ | ||
tags?: SymbolTag[]; | ||
/** | ||
* More detail for this item, e.g. the signature of a function. | ||
*/ | ||
detail?: string; | ||
/** | ||
* The resource identifier of this item. | ||
*/ | ||
uri: DocumentUri; | ||
/** | ||
* The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code. | ||
*/ | ||
range: Range; | ||
/** | ||
* The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. | ||
* Must be contained by the [`range`](#CallHierarchyItem.range). | ||
*/ | ||
selectionRange: Range; | ||
} | ||
/** | ||
* Represents an incoming call, e.g. a caller of a method or constructor. | ||
*/ | ||
export interface CallHierarchyIncomingCall { | ||
/** | ||
* The item that makes the call. | ||
*/ | ||
from: CallHierarchyItem; | ||
/** | ||
* The range at which at which the calls appears. This is relative to the caller | ||
* denoted by [`this.from`](#CallHierarchyIncomingCall.from). | ||
*/ | ||
fromRanges: Range[]; | ||
} | ||
/** | ||
* Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc. | ||
*/ | ||
export interface CallHierarchyOutgoingCall { | ||
/** | ||
* The item that is called. | ||
*/ | ||
to: CallHierarchyItem; | ||
/** | ||
* The range at which this item is called. This is the range relative to the caller, e.g the item | ||
* passed to [`provideCallHierarchyOutgoingCalls`](#CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls) | ||
* and not [`this.to`](#CallHierarchyOutgoingCall.to). | ||
*/ | ||
fromRanges: Range[]; | ||
} | ||
export interface CallHierarchyClientCapabilities { | ||
@@ -33,82 +93,25 @@ /** | ||
/** | ||
* The parameter of a `textDocument/callHierarchy` request extends the `TextDocumentPositionParams` with the direction of calls to resolve. | ||
* The parameter of a `textDocument/prepareCallHierarchy` request. | ||
*/ | ||
export interface CallHierarchyParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams { | ||
/** | ||
* The direction of calls to provide. | ||
*/ | ||
direction: CallHierarchyDirection; | ||
export interface CallHierarchyPrepareParams extends TextDocumentPositionParams, WorkDoneProgressParams { | ||
} | ||
/** | ||
* The direction of a call hierarchy request. | ||
*/ | ||
export declare namespace CallHierarchyDirection { | ||
/** | ||
* The callers | ||
*/ | ||
const CallsFrom: 1; | ||
/** | ||
* The callees | ||
*/ | ||
const CallsTo: 2; | ||
export declare namespace CallHierarchyPrepareRequest { | ||
const type: RequestType<CallHierarchyPrepareParams, CallHierarchyItem[] | null, void, CallHierarchyRegistrationOptions>; | ||
type HandlerSignature = RequestHandler<CallHierarchyPrepareParams, CallHierarchyItem[] | null, void>; | ||
} | ||
export declare type CallHierarchyDirection = 1 | 2; | ||
export interface CallHierarchyItem { | ||
/** | ||
* The name of the symbol targeted by the call hierarchy request. | ||
*/ | ||
name: string; | ||
/** | ||
* More detail for this symbol, e.g the signature of a function. | ||
*/ | ||
detail?: string; | ||
/** | ||
* The kind of this symbol. | ||
*/ | ||
kind: SymbolKind; | ||
/** | ||
* URI of the document containing the symbol. | ||
*/ | ||
uri: string; | ||
/** | ||
* The range enclosing this symbol not including leading/trailing whitespace but everything else | ||
* like comments. This information is typically used to determine if the the clients cursor is | ||
* inside the symbol to reveal in the symbol in the UI. | ||
*/ | ||
range: Range; | ||
/** | ||
* The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. | ||
* Must be contained by the the `range`. | ||
*/ | ||
selectionRange: Range; | ||
export interface CallHierarchyIncomingCallsParams extends WorkDoneProgressParams, PartialResultParams { | ||
item: CallHierarchyItem; | ||
} | ||
/** | ||
* The result of a `textDocument/callHierarchy` request. | ||
*/ | ||
export interface CallHierarchyCall { | ||
/** | ||
* The source range of the reference. The range is a sub range of the `from` symbol range. | ||
*/ | ||
range: Range; | ||
/** | ||
* The symbol that contains the reference. | ||
*/ | ||
from: CallHierarchyItem; | ||
/** | ||
* The symbol that is referenced. | ||
*/ | ||
to: CallHierarchyItem; | ||
export declare namespace CallHierarchyIncomingCallsRequest { | ||
const type: RequestType<CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall[] | null, void, void>; | ||
const resultType: ProgressType<CallHierarchyIncomingCall[]>; | ||
type HandlerSignature = RequestHandler<CallHierarchyIncomingCallsParams, CallHierarchyIncomingCall[] | null, void>; | ||
} | ||
/** | ||
* Request to provide the call hierarchy at a given text document position. | ||
* | ||
* The request's parameter is of type [CallHierarchyParams](#CallHierarchyParams). The response | ||
* is of type [CallHierarchyCall[]](#CallHierarchyCall) or a Thenable that resolves to such. | ||
* | ||
* Evaluates the symbol defined (or referenced) at the given position, and returns all incoming or outgoing calls to the symbol(s). | ||
*/ | ||
export declare namespace CallHierarchyRequest { | ||
const type: RequestType<CallHierarchyParams, CallHierarchyCall[], void, CallHierarchyRegistrationOptions>; | ||
const resultType: ProgressType<CallHierarchyCall[]>; | ||
type HandlerSignature = RequestHandler<CallHierarchyParams, CallHierarchyCall[] | null, void>; | ||
export interface CallHierarchyOutgoingCallsParams extends WorkDoneProgressParams, PartialResultParams { | ||
item: CallHierarchyItem; | ||
} | ||
export declare namespace CallHierarchyOutgoingCallsRequest { | ||
const type: RequestType<CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall[] | null, void, void>; | ||
const resultType: ProgressType<CallHierarchyOutgoingCall[]>; | ||
type HandlerSignature = RequestHandler<CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCall[] | null, void>; | ||
} |
@@ -8,28 +8,15 @@ /* -------------------------------------------------------------------------------------------- | ||
const vscode_jsonrpc_1 = require("vscode-jsonrpc"); | ||
/** | ||
* The direction of a call hierarchy request. | ||
*/ | ||
var CallHierarchyDirection; | ||
(function (CallHierarchyDirection) { | ||
/** | ||
* The callers | ||
*/ | ||
CallHierarchyDirection.CallsFrom = 1; | ||
/** | ||
* The callees | ||
*/ | ||
CallHierarchyDirection.CallsTo = 2; | ||
})(CallHierarchyDirection = exports.CallHierarchyDirection || (exports.CallHierarchyDirection = {})); | ||
/** | ||
* Request to provide the call hierarchy at a given text document position. | ||
* | ||
* The request's parameter is of type [CallHierarchyParams](#CallHierarchyParams). The response | ||
* is of type [CallHierarchyCall[]](#CallHierarchyCall) or a Thenable that resolves to such. | ||
* | ||
* Evaluates the symbol defined (or referenced) at the given position, and returns all incoming or outgoing calls to the symbol(s). | ||
*/ | ||
var CallHierarchyRequest; | ||
(function (CallHierarchyRequest) { | ||
CallHierarchyRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/callHierarchy'); | ||
CallHierarchyRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(CallHierarchyRequest = exports.CallHierarchyRequest || (exports.CallHierarchyRequest = {})); | ||
var CallHierarchyPrepareRequest; | ||
(function (CallHierarchyPrepareRequest) { | ||
CallHierarchyPrepareRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/prepareCallHierarchy'); | ||
})(CallHierarchyPrepareRequest = exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {})); | ||
var CallHierarchyIncomingCallsRequest; | ||
(function (CallHierarchyIncomingCallsRequest) { | ||
CallHierarchyIncomingCallsRequest.type = new vscode_jsonrpc_1.RequestType('callHierarchy/incomingCalls'); | ||
CallHierarchyIncomingCallsRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(CallHierarchyIncomingCallsRequest = exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {})); | ||
var CallHierarchyOutgoingCallsRequest; | ||
(function (CallHierarchyOutgoingCallsRequest) { | ||
CallHierarchyOutgoingCallsRequest.type = new vscode_jsonrpc_1.RequestType('callHierarchy/outgoingCalls'); | ||
CallHierarchyOutgoingCallsRequest.resultType = new vscode_jsonrpc_1.ProgressType(); | ||
})(CallHierarchyOutgoingCallsRequest = exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {})); |
@@ -33,5 +33,5 @@ import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc'; | ||
export declare namespace DeclarationRequest { | ||
const type: RequestType<DeclarationParams, Location | Location[] | LocationLink[] | null, void, DeclarationRegistrationOptions>; | ||
const resultType: ProgressType<Location[] | LocationLink[]>; | ||
const type: RequestType<DeclarationParams, Location | LocationLink[] | Location[] | null, void, DeclarationRegistrationOptions>; | ||
const resultType: ProgressType<LocationLink[] | Location[]>; | ||
type HandlerSignature = RequestHandler<DeclarationParams, Declaration | DeclarationLink[] | null, void>; | ||
} |
@@ -35,4 +35,4 @@ import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc'; | ||
const type: RequestType<ImplementationParams, Location | Location[] | LocationLink[] | null, void, ImplementationRegistrationOptions>; | ||
const resultType: ProgressType<Location[] | LocationLink[]>; | ||
const resultType: ProgressType<LocationLink[] | Location[]>; | ||
type HandlerSignature = RequestHandler<ImplementationParams, Definition | DefinitionLink[] | null, void>; | ||
} |
@@ -35,4 +35,4 @@ import { RequestType, RequestHandler, ProgressType } from 'vscode-jsonrpc'; | ||
const type: RequestType<TypeDefinitionParams, Location | Location[] | LocationLink[] | null, void, TypeDefinitionRegistrationOptions>; | ||
const resultType: ProgressType<Location[] | LocationLink[]>; | ||
const resultType: ProgressType<LocationLink[] | Location[]>; | ||
type HandlerSignature = RequestHandler<TypeDefinitionParams, Definition | DefinitionLink[] | null, void>; | ||
} |
@@ -9,3 +9,2 @@ export declare function boolean(value: any): value is boolean; | ||
export declare function typedArray<T>(value: any, check: (value: any) => boolean): value is T[]; | ||
export declare function thenable<T>(value: any): value is Thenable<T>; | ||
export declare function objectLiteral(value: any): value is object; |
@@ -39,6 +39,2 @@ /* -------------------------------------------------------------------------------------------- | ||
exports.typedArray = typedArray; | ||
function thenable(value) { | ||
return value && func(value.then); | ||
} | ||
exports.thenable = thenable; | ||
function objectLiteral(value) { | ||
@@ -45,0 +41,0 @@ // Strictly speaking class instances pass this check as well. Since the LSP |
{ | ||
"name": "vscode-languageserver-protocol", | ||
"description": "VSCode Language Server Protocol implementation", | ||
"version": "3.15.0-next.11", | ||
"version": "3.15.0-next.12", | ||
"author": "Microsoft Corporation", | ||
@@ -18,3 +18,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"vscode-jsonrpc": "^5.0.0-next.3", | ||
"vscode-jsonrpc": "^5.0.0-next.5", | ||
"vscode-languageserver-types": "^3.15.0-next.7" | ||
@@ -21,0 +21,0 @@ }, |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172429
31
4103
Updatedvscode-jsonrpc@^5.0.0-next.5